ไปยังเนื้อหาหลัก

วิธีอ้างอิงชื่อแท็บในเซลล์ใน Excel

สำหรับการอ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ใน Excel คุณสามารถทำได้ด้วยสูตรหรือ User Define Function บทช่วยสอนนี้จะแนะนำคุณดังนี้

อ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ด้วยสูตร
อ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ด้วย User Define Function
อ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ได้อย่างง่ายดายด้วย Kutools for Excel


อ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ด้วยสูตร

โปรดทำดังต่อไปนี้เพื่ออ้างอิงชื่อแท็บแผ่นงานที่ใช้งานอยู่ในเซลล์เฉพาะใน Excel

1. เลือกเซลล์ว่างคัดลอกและวางสูตร = MID (CELL ("ชื่อไฟล์", A1), FIND ("]", CELL ("ชื่อไฟล์", A1)) + 1,255) ลงในแถบสูตรแล้วกดปุ่ม เข้าสู่ สำคัญ. ดูภาพหน้าจอ:

ตอนนี้ชื่อแท็บแผ่นงานถูกอ้างอิงในเซลล์

แทรกชื่อแท็บในเซลล์ส่วนหัวหรือส่วนท้ายในแผ่นงานได้อย่างง่ายดาย:

พื้นที่ Kutools สำหรับ Excel's แทรกข้อมูลสมุดงาน ยูทิลิตี้ช่วยให้แทรกชื่อแท็บที่ใช้งานลงในเซลล์เฉพาะได้อย่างง่ายดาย นอกจากนี้คุณสามารถอ้างอิงชื่อสมุดงานเส้นทางสมุดงานชื่อผู้ใช้ ฯลฯ ลงในเซลล์ส่วนหัวหรือส่วนท้ายของแผ่นงานได้ตามที่คุณต้องการ คลิกเพื่อดูรายละเอียด
ดาวน์โหลด Kutools สำหรับ Excel ทันที! (เส้นทางฟรี 30 วัน)


อ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ด้วย User Define Function

นอกเหนือจากวิธีการข้างต้นคุณสามารถอ้างอิงชื่อแท็บแผ่นงานในเซลล์ด้วย User Define Function

1 กด อื่น ๆ + F11 เพื่อเปิด Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

2 ใน Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่างคลิก สิ่งที่ใส่เข้าไป > โมดูล. ดูภาพหน้าจอ:

3. คัดลอกและวางรหัสด้านล่างลงในหน้าต่างรหัส จากนั้นกด อื่น ๆ + Q ปุ่มเพื่อปิดไฟล์ Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

รหัส VBA: ชื่อแท็บอ้างอิง

Function TabName()
  TabName = ActiveSheet.Name
End Function

4. ไปที่เซลล์ที่คุณต้องการอ้างอิงชื่อแท็บแผ่นงานปัจจุบันโปรดป้อน = TabName () จากนั้นกดปุ่ม เข้าสู่ สำคัญ. จากนั้นชื่อแท็บแผ่นงานปัจจุบันจะแสดงในเซลล์


อ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ด้วย Kutools for Excel

กับ แทรกข้อมูลสมุดงาน ประโยชน์ของ Kutools สำหรับ Excelคุณสามารถอ้างอิงชื่อแท็บแผ่นงานในเซลล์ใดก็ได้ที่คุณต้องการ กรุณาดำเนินการดังนี้

1 คลิก Kutools พลัส > สมุดงาน > แทรกข้อมูลสมุดงาน. ดูภาพหน้าจอ:

2 ใน แทรกข้อมูลสมุดงาน ใหเลือก ชื่อแผ่นงาน ใน ข้อมูล และในส่วน แทรกที่ เลือก พิสัย จากนั้นเลือกเซลล์ว่างเพื่อค้นหาชื่อแผ่นงานจากนั้นคลิกไฟล์ OK ปุ่ม

คุณสามารถเห็นชื่อแผ่นงานปัจจุบันถูกอ้างอิงในเซลล์ที่เลือก ดูภาพหน้าจอ:

  หากคุณต้องการทดลองใช้ยูทิลิตีนี้ฟรี (30 วัน) กรุณาคลิกเพื่อดาวน์โหลดแล้วไปใช้การดำเนินการตามขั้นตอนข้างต้น


Demo: อ้างอิงชื่อแท็บแผ่นงานปัจจุบันในเซลล์ได้อย่างง่ายดายด้วย Kutools for Excel

Kutools สำหรับ Excel มีเครื่องมือ Excel ที่มีประโยชน์มากกว่า 300 รายการ ทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 30 วัน ดาวน์โหลดทดลองใช้ฟรีทันที!

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (24)
Rated 0.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
sorry your formulas and everything are incorrect on this page.
after direct copy/paste your THEORIES were WRONG
ZERO OUT OF TWO ATTEMPTS WORKED USING YOUR SUGGESTIONS
Rated 0.5 out of 5
This comment was minimized by the moderator on the site
Hi Julia,
What kind of erro did you get?
To be mentioned, the formula provided in the post can only be applied in English system environment Excel. If you have Excel in a different language than English, please convert the formula from English to the language you are currently using.
You can translate the formula in this page: https://de.excel-translator.de/translator/
This comment was minimized by the moderator on the site
The formula at the top won't work until you save the file to your hard drive.
This comment was minimized by the moderator on the site
If you're using Excel Online. I found a solution for this issue.

You need to use 2 cells to make it work. As long as you have a cell that has the reference of a tab in its name, you can use FORMULATEXT() to turn that cells formula into a string and then extract the name that way. I can't imagine a scenario where you will want to reference another sheet and you wont already have a cell referencing that sheet for information on it, but you can always just make a blank/hidden (however you want to do it) cell that is just referencing the other sheet to set this formula up. In the below example, it is referencing cell B1 and cell B1 just contains =Sheet2!A1 as a reference to the sheet I want to name. If you use a name for a sheet with a space in it (example: Sheet 1) it would show up as (='Sheet 1'A1). I used an IF function and an ISERROR function to search if the string contains a space or not and two MID functions to extract the name of the sheet from both scenarios. If you update the name of the referenced sheet, cell B1 will change its formula and subsequently change the string and output the correct name each time.

=IF(ISERROR(FIND(" ",FORMULATEXT(B1))),MID(FORMULATEXT(B1),2,FIND("!",FORMULATEXT(B1))-2),MID(FORMULATEXT(B1),3,FIND("!",FORMULATEXT(B1))-4))
This comment was minimized by the moderator on the site
If you're using Excel Online. I found a solution for this issue.

You need to use 2 cells to make it work. As long as you have a cell that has the reference of a tab in its name, you can use FORMULATEXT() to turn that cells formula into a string and then extract the name that way. I can't imagine a scenario where you will want to reference another sheet and you wont already have a cell referencing that sheet for information on it, but you can always just make a blank/hidden (however you want to do it) cell that is just referencing the other sheet to set this formula up. In the below example, it is referencing cell B1 and cell B1 just contains =Sheet2!A1 as a reference to the sheet I want to name. If you use a name for a sheet with a space in it (example: Sheet 1) it would show up as (='Sheet 1'A1). I used an IF function and an ISERROR function to search if the string contains a space or not and two MID functions to extract the name of the sheet from both scenarios. If you update the name of the referenced sheet, cell B1 will change its formula and subsequently change the string and output the correct name each time.

=IF(ISERROR(FIND(" ",FORMULATEXT(B1))),MID(FORMULATEXT(B1),2,FIND("!",FORMULATEXT(B1))-2),MID(FORMULATEXT(B1),3,FIND("!",FORMULATEXT(B1))-4))
This comment was minimized by the moderator on the site
What I really want is to name some tabs using with the names on some cells from another sheet (same document of course). How can I do that?
This comment was minimized by the moderator on the site
Hi, I used the above suggestions but the first formula to reference the tab sheet name will not work on "excel" online. The second works, but the "Tabname" keeps showing the same tab name for all tabs on the workbook.
This comment was minimized by the moderator on the site
Hi,
Sorry we didn't test in excel online. Can't help you with that yet. Thank you for your comment.
This comment was minimized by the moderator on the site
hello, i am having trouble referencing a sheet name into a cell with online excel
This comment was minimized by the moderator on the site
Excellent, thanks! Per: Reference the current sheet tab name in cell with formula
This comment was minimized by the moderator on the site
Sorry, the comment line is wrong - should be Ctrl-Alt-Shift-F9
This comment was minimized by the moderator on the site
FYI, you need to have more than one sheet in your workbook for this to work. Otherwise, the formula will display the filename but no sheet name.
This comment was minimized by the moderator on the site
Good Day,
Thank you for your comment. I have tested the formula in a workbook that has only one sheet, but everything was running smoothly. The formula only displays the sheet name no matter how many worksheets existing in a workbook.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations