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

จะสร้างรายชื่อแผ่นงานทั้งหมดจากสมุดงานได้อย่างไร?

สมมติว่าคุณมีสมุดงานที่มีแผ่นงานหลายแผ่นตอนนี้คุณต้องการแสดงรายการชื่อแผ่นงานทั้งหมดในสมุดงานปัจจุบันมีวิธีการอย่างรวดเร็วในการสร้างรายการชื่อแผ่นงานเหล่านี้ใน Excel โดยไม่ต้องพิมพ์ทีละแผ่นหรือไม่? บทช่วยสอนนี้ให้คำแนะนำเกี่ยวกับวิธีแสดงรายการชื่อเวิร์กชีตใน Excel

รับรายการชื่อเวิร์กชีตทั้งหมดจากเวิร์กบุ๊กพร้อมสูตรแบบไดนามิก

รับรายการชื่อเวิร์กชีตทั้งหมดจากเวิร์กบุ๊กพร้อมคุณสมบัติที่มีประโยชน์

รับรายการชื่อเวิร์กชีตทั้งหมดจากสมุดงานพร้อมรหัส VBA


รับรายการชื่อเวิร์กชีตทั้งหมดจากเวิร์กบุ๊กพร้อมสูตรแบบไดนามิก

ใน Excel คุณสามารถกำหนดชื่อช่วงจากนั้นใช้สูตรเพื่อแสดงชื่อแผ่นงานทั้งหมดจากสมุดงานปัจจุบันโปรดทำตามขั้นตอนต่อไปนี้:

1. ไปที่คลิก สูตร > ชื่อผู้จัดการดูภาพหน้าจอ:

2. ใน ชื่อผู้จัดการ คลิกตกลง ใหม่ ปุ่มดูภาพหน้าจอ:

3. ในการโผล่ออกมา ชื่อใหม่ ให้ระบุชื่อลงในไฟล์ Name กล่องข้อความจากนั้นคัดลอกสูตรด้านล่างลงในไฟล์ อ้างถึง กล่องข้อความดูภาพหน้าจอ:

=GET.WORKBOOK(1)&T(NOW())

4. จากนั้นคลิก OK > ปิดหน้านี้ เพื่อปิดกล่องโต้ตอบตอนนี้โปรดไปที่แผ่นงานที่คุณต้องการแสดงชื่อแผ่นงานทั้งหมดจากนั้นป้อนสูตรต่อไปนี้ลงในเซลล์ว่าง:

=IFERROR(INDEX(MID(Sheetnames,FIND("]",Sheetnames)+1,255),ROWS($A$2:A2)),"")

หมายเหตุ: ในสูตรข้างต้น ชื่อแผ่นงาน คือชื่อช่วงที่คุณอยู่ในขั้นตอนที่ 3

5. จากนั้นลากที่จับเติมลงไปที่เซลล์เมื่อเซลล์ว่างปรากฏขึ้นและตอนนี้ชื่อแผ่นงานทั้งหมดของสมุดงานปัจจุบันได้รับการระบุไว้ดังภาพด้านล่างที่แสดง:

6. หากคุณต้องการสร้างไฮเปอร์ลิงก์สำหรับแต่ละแผ่นงานโปรดใช้สูตรด้านล่าง:

=HYPERLINK("#'"&A2&"'!A1","Go To Sheet")

หมายเหตุ: ในสูตรข้างต้น A2 คือเซลล์ที่มีชื่อแผ่นงานและ A1 คือเซลล์ที่คุณต้องการให้เซลล์ที่ใช้งานอยู่ตั้งอยู่ ตัวอย่างเช่นหากคุณคลิกข้อความไฮเปอร์ลิงก์ระบบจะค้นหาเซลล์ A1 ของแผ่นงาน

7. ตอนนี้เมื่อคุณคลิกข้อความไฮเปอร์ลิงก์ระบบจะนำคุณไปยังแผ่นงานนั้นดูการสาธิตด้านล่าง:

เคล็ดลับ:
  • 1. ด้วยสูตรข้างต้นชื่อแผ่นงานที่สร้างขึ้นจะแสดงรายการแบบไดนามิกเมื่อคุณเปลี่ยนชื่อแผ่นงานในสมุดงานชื่อแผ่นงานดัชนีจะได้รับการอัปเดตโดยอัตโนมัติ
  • 2. คุณควรบันทึกไฟล์เป็น สมุดงานที่เปิดใช้งานแมโคร Excel ถ้าคุณต้องการให้สูตรทำงานได้ดีหลังจากปิดไฟล์และเปิดขึ้นมาใหม่

รับรายการชื่อเวิร์กชีตทั้งหมดจากเวิร์กบุ๊กพร้อมคุณสมบัติที่มีประโยชน์

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

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

หลังจากการติดตั้ง Kutools สำหรับ Excelโปรดทำตามนี้:

1. คลิก Kutools พลัส > แผ่นงาน > สร้างรายชื่อแผ่นงานดูภาพหน้าจอ:

2. ใน สร้างรายชื่อแผ่นงาน โปรดระบุการตั้งค่าต่อไปนี้:

(1. ) เลือก รูปแบบดัชนีชีต คุณต้องการคุณสามารถสร้างชื่อเวิร์กชีตด้วยไฮเปอร์ลิงก์หรือปุ่มมาโคร

(2. ) ป้อนชื่อแผ่นงานสำหรับดัชนีชีต

(3. ) ระบุตำแหน่งของดัชนีแผ่นงาน

(4. ) ระบุจำนวนคอลัมน์ที่คุณต้องการใช้ในแผ่นงานใหม่เพื่อแสดงชื่อแผ่นงาน

3. หลังจากเสร็จสิ้นการตั้งค่าแล้วคลิก OK. ชื่อเวิร์กชีตทั้งหมดแสดงรายการพร้อมลิงก์ในแผ่นงานใหม่ของสมุดงานปัจจุบัน ดูภาพหน้าจอ:

ชื่อแผ่นงานที่มีการเชื่อมโยงหลายมิติ ชื่อเวิร์กชีตที่มีปุ่มมาโคร
ปลาย: หากต้องการใช้คุณสมบัตินี้ คุณควรติดตั้ง Kutools สำหรับ Excel ก่อนอื่นโปรด คลิกเพื่อดาวน์โหลดและทดลองใช้ฟรี 30 วัน ขณะนี้

รับรายการชื่อเวิร์กชีตทั้งหมดจากสมุดงานพร้อมรหัส VBA

1. กด ALT + F11 และจะเปิดไฟล์ Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

2. คลิก สิ่งที่ใส่เข้าไป > โมดูลและวางมาโครต่อไปนี้ในไฟล์ โมดูล หน้าต่าง.

VBA: แสดงชื่อเวิร์กชีตทั้งหมดพร้อมไฮเปอร์ลิงก์ในเวิร์กชีตใหม่:

Sub CreateIndex()
'updateby Extendoffice
    Dim xAlerts As Boolean
    Dim I  As Long
    Dim xShtIndex As Worksheet
    Dim xSht As Variant
    xAlerts = Application.DisplayAlerts
    Application.DisplayAlerts = False
    On Error Resume Next
    Sheets("Index").Delete
    On Error GoTo 0
    Set xShtIndex = Sheets.Add(Sheets(1))
    xShtIndex.Name = "Index"
    I = 1
    Cells(1, 1).Value = "INDEX"
    For Each xSht In ThisWorkbook.Sheets
        If xSht.Name <> "Index" Then
            I = I + 1
            xShtIndex.Hyperlinks.Add Cells(I, 1), "", "'" & xSht.Name & "'!A1", , xSht.Name
        End If
    Next
    Application.DisplayAlerts = xAlerts
End Sub

3. กด F5 กุญแจสำคัญในการเรียกใช้แมโครนี้ ตอนนี้ชื่อแผ่นงานทั้งหมดในสมุดงานที่ใช้งานอยู่ในแผ่นงานใหม่ที่เรียกว่า ดัชนี และชื่อแผ่นงานจะเชื่อมโยงกับแต่ละแผ่นงานด้วย ดูภาพหน้าจอ:

Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
First, thanks to the author. And adding the Czech version.

tp 3. =O.KNIZE(1)&T(NYNÍ())
tp 4. =IFERROR(INDEX(ČÁST(nazvylistu;NAJÍT("]";nazvylistu)+1;255);ŘÁDKY($A$2:A4));"")
This comment was minimized by the moderator on the site
Hello,

je viens de tester la méthode via macros (dynamique avec formules) et ça marche au poil donc je tiens vraiment à remercier l'auteur de cet article parce que ça va vraiment m'aider dans mon travail ! Juste, je me permet de corriger les formules pour la version française. Et alors je ne sais pas si c'est parce que je suis sous la version 2019 mais Excel rouspète quand il n'y a pas d'argument en 3ème position de la fonction STXT ("MID" en version anglaise) donc obligé d'en rajouter un. Donc voilà ce que ça donne :

=LIRE.CLASSEUR(1)&T(MAINTENANT())

=SIERREUR(INDEX(STXT(nomsFeuilles;TROUVE("]";nomsFeuilles)+1,255;20);LIGNES($A$2:A2));"")

Bon travail à tous ! ;-)
This comment was minimized by the moderator on the site
Hello, Gizmil
Thank you for your comment, there are some functions are only available for English in Excel.
Your formula may help others.
Thanks again!
This comment was minimized by the moderator on the site
I close and open my document and all values in my sheet names column are all gone and blank but still the formula is there. I tried entering the same formula but it doesn't show the value anymore
This comment was minimized by the moderator on the site
Hello, Anne,
Sorrry for replying late, after creating the range names and formulas, you should save the workbook as Excel Macro-Enabled Workbook format, so next time, when you open the Excel file,the formulas can work well.
Please try, hope it can help you!
This comment was minimized by the moderator on the site
I tried this one and it works. But when I close and open the file again all the values in my sheet names are blank and gone but the formula is still there. I tried enteing the same formula again but it doesn't show the value anymore
This comment was minimized by the moderator on the site
BRILLIANT!! Thank you so much! 😊
This comment was minimized by the moderator on the site
Causes problems when document protection is enabled by email or corporate policy
This comment was minimized by the moderator on the site
Thanks so much, this worked great.
This comment was minimized by the moderator on the site
Works great!! Thank you!!!!
This comment was minimized by the moderator on the site
sooooo helpful, works as expected!!!!! Thanks
This comment was minimized by the moderator on the site
THANK YOU SO MUCH! I freaking love your website. In a matter of minutes I've had a ton of time saved with two sections of this site including this one. Love it!
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