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

วิธีสร้างรายการชื่อแผ่นงานแบบไดนามิกใน Excel

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

สร้างรายการแบบไดนามิกของชื่อเวิร์กชีตด้วยกำหนดชื่อและสูตร

สร้างรายการแบบไดนามิกของชื่อเวิร์กชีตด้วยรหัส VBA

สร้างรายการแบบไดนามิกของชื่อแผ่นงานด้วย Kutools for Excel ความคิดที่ดี 3

แสดงรายการชื่อเวิร์กชีตแบบไดนามิกด้วย Kutools for Excel ความคิดที่ดี 3


1. เลือกเซลล์ในแผ่นงานเปล่าที่นี่ฉันเลือก A1 แล้วคลิก สูตร > กำหนดชื่อ. ดูภาพหน้าจอ:
doc-dynamic-ชื่อแผ่นงาน-รายการ-1

2. จากนั้นใน ชื่อใหม่ โต้ตอบพิมพ์ แผ่น เข้าสู่ Name กล่องข้อความ (คุณสามารถเปลี่ยนแปลงได้ตามต้องการ) และพิมพ์สูตรนี้ = SUBSTITUTE (GET.WORKBOOK (1), "[" & GET.WORKBOOK (16) & "]", "") ลงในกล่องข้อความอ้างอิงถึง ดูภาพหน้าจอ:
doc-dynamic-ชื่อแผ่นงาน-รายการ-2

3 คลิก OK. ไปที่เซลล์ที่เลือก (A1) แล้วพิมพ์สูตรนี้ = INDEX (ชีต, แถว ($ A $ 1: $ A1)) (A1 คือเซลล์ที่คุณพิมพ์สูตรนี้ "ชีต" คือชื่อที่คุณกำหนดในขั้นตอนที่ 2) ลงในเซลล์จากนั้นลากที่จับการป้อนอัตโนมัติลงไปจนถึง #REF! ปรากฏขึ้น
doc-dynamic-ชื่อแผ่นงาน-รายการ-3

ปลาย: หากมีการลบหรือเพิ่มแผ่นงานคุณจะต้องไปที่ A1 แล้วกดปุ่ม Enter จากนั้นดึงที่จับการป้อนอัตโนมัติอีกครั้ง
doc-dynamic-ชื่อแผ่นงาน-รายการ-4


หากคุณต้องการสร้างรายการชื่อเวิร์กชีตแบบไดนามิกซึ่งสามารถเชื่อมโยงไปยังแต่ละแผ่นงานได้คุณสามารถใช้รหัส VBA

1. สร้างแผ่นงานใหม่และเปลี่ยนชื่อเป็นดัชนี ดูภาพหน้าจอ:

doc-dynamic-ชื่อแผ่นงาน-รายการ-5       doc-dynamic-ชื่อแผ่นงาน-รายการ-6

2. คลิกขวาที่ชื่อชีตของ Index เลือก ดูรหัส จากเมนูบริบท ดูภาพหน้าจอ:
doc-dynamic-ชื่อแผ่นงาน-รายการ-7

3. ในหน้าต่าง popping ให้คัดลอกและวางโค้ด VBA ด้านล่างลงไป

VBA: สร้างรายการชื่อเวิร์กชีตแบบไดนามิก

Private Sub Worksheet_Activate()
	'Updateby20150305
	Dim xSheet As Worksheet
	Dim xRow As Integer
	Dim calcState As Long
	Dim scrUpdateState As Long
	Application.ScreenUpdating = False
	xRow                       = 1
	With Me
		.Columns(1).ClearContents
		.Cells(1, 1) = "INDEX"
		.Cells(1, 1).Name = "Index"
	End With
	For Each xSheet In Application.Worksheets
		If xSheet.Name <> Me.Name Then
			xRow                     = xRow + 1
			With xSheet
				.Range("A1").Name = "Start_" & xSheet.Index
				.Hyperlinks.Add anchor: = .Range("A1"), Address: = "", _
				SubAddress:             = "Index", TextToDisplay: = "Back to Index"
			End With
			Me.Hyperlinks.Add anchor: = Me.Cells(xRow, 1), Address: = "", _
			SubAddress: = "Start_" & xSheet.Index, TextToDisplay: = xSheet.Name
		End If
	Next
	Application.ScreenUpdating = True
End Sub

4 คลิก วิ่ง or F5 เพื่อเรียกใช้ VBA ตอนนี้รายการแบบไดนามิกของชื่อเวิร์กชีตถูกสร้างขึ้น
doc-dynamic-ชื่อแผ่นงาน-รายการ-8

เคล็ดลับ:

1. เมื่อแผ่นงานของสมุดงานถูกลบหรือแทรกรายการชื่อแผ่นงานจะเปลี่ยนโดยอัตโนมัติ

2. คุณสามารถคลิกที่ชื่อแผ่นงานของรายการรายชื่อเพื่อไปที่แผ่นงาน

ด้วยสองวิธีข้างต้นไม่สะดวกพอหากคุณสนใจยูทิลิตี้ใหม่คุณสามารถใช้สองวิธีถัดไปซึ่งอาจทำให้งานนี้ง่ายขึ้น


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

Kutools สำหรับ Excel, ที่มีมากกว่า 300 ฟังก์ชั่นที่มีประโยชน์ทำให้งานของคุณง่ายขึ้น 

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

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

ชื่อแผ่นงานไดนามิก doc 17

2 ใน สร้างรายชื่อแผ่นงาน ไดอะล็อก:

 รายการชื่อเวิร์กชีต doc แบบไดนามิก 2
(1) ตรวจสอบรูปแบบดัชนีที่คุณต้องการ รูปแบบดัชนีชีต มาตรา;
(2) ตั้งชื่อแผ่นดัชนีใหม่โดยพิมพ์ข้อมูลลงใน ระบุชื่อแผ่นงานสำหรับ Sheet Index กล่องข้อความ;
(3) ระบุตำแหน่งที่คุณจะวางแผ่นดัชนีที่เพิ่มในไฟล์ ใส่ดัชนีชีตเข้า รายการ;
(4) หากคุณต้องการแสดงชื่อแผ่นงานในรายการเดียวให้เลือก 1 คอลัมน์ใน แสดงดัชนีชีตเป็น รายการ.

3 คลิก Ok. ตอนนี้คุณสามารถเห็นชื่อแผ่นงานอยู่ในรายการ
doc kutools สร้างรายการแผ่นงาน 3

ทิปส์:

1. คุณสามารถคลิกที่ชื่อแผ่นงานเพื่อเปลี่ยนเป็นแผ่นงานต้นฉบับได้อย่างรวดเร็ว

2. ชื่อรายการหรือแผ่นงานไม่สามารถเปลี่ยนแปลงแบบไดนามิกเมื่อแทรกหรือลบแผ่นงาน

3. จริงๆแล้วคุณยังสามารถสร้างรายการปุ่มเพื่อเชื่อมโยงชีตญาติได้เพียงแค่ต้องตรวจสอบ ประกอบด้วยปุ่มและมาโคร ในกล่องโต้ตอบ ดู screeshshot:
doc kutools สร้างรายการแผ่นงาน 4

คลิกที่นี่เพื่อเรียนรู้เพิ่มเติมเกี่ยวกับ Create List of Sheet Names


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

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

1 คลิก Kutools > การเดินเรือ. คลิก สมุดงานและแผ่นงาน เพื่อแสดงเวิร์กบุ๊กและเวิร์กชีตและคุณสามารถเลือกเวิร์กบุ๊กจากนั้นเวิร์กชีตจะแสดงในไฟล์ การเดินเรือ บานหน้าต่าง ดูภาพหน้าจอ:
บานหน้าต่างนำทาง doc 1   

เคล็ดลับ:

เมื่อมีการลบหรือเพิ่มเวิร์กชีตคุณสามารถคลิกไฟล์ ปุ่มรีเฟรช บานหน้าต่างนำทาง doc 2 ใน ระบบนำทางn บานหน้าต่างเพื่อรีเฟรชชื่อแผ่นงาน

คลิกที่นี่เพื่อดูข้อมูลเพิ่มเติมเกี่ยวกับการนำทาง

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

🤖 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 (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hallo. hoe zou ik dit kunnen doen om hetzelfde te doen maar met een welbepaade cel van verschillende werkbladen. Bv. een leeg tabblad. mijn andere werkbladen hebben allemaal dezelfde lay-out, maar in iedere cel een andere tekst. Nu zou ik graag in mijn leeg tabblad in Cel A1 de gegevens terugvinden van tabblad1 cel B3. Maar dan zou ik graag in Cel A2 de gegevens terugvinden van tabblad 2 cel 3. En zou naar beneden en dit in een beweging. We kunnen allemaal afzonderlijk doen, maar als er 500 werkbladen zijn, is dit onmogelijk.

Merci voor den input.
This comment was minimized by the moderator on the site
Hi, I guess you want to list all same cells across multiple sheets, if so, there are two tutorials may help you. Please visit:
How to reference same cell from multiple worksheets in Excel?
How to create a list from same cells across multiple sheets in Excel?
Hope it is helpful.
This comment was minimized by the moderator on the site
Em português brasileiro, GET.WORKBOOK é identificado como uma função no Gerenciador de Nomes para criar o nome "Sheets", mas ao referenciar "Sheets" numa célula, aparece o erro "#NOME?". Tentei várias vezes, inclusive com a sugestão de traduzir GET.WORKBOOK para OBTER.LIVRO mas não funcionou.
This comment was minimized by the moderator on the site
Hi, try this: =SUBSTITUIR(INFO.PASTA.TRABALHO(1),"["&INFO.PASTA.TRABALHO(16)&"]","")
This comment was minimized by the moderator on the site
Thanks for this helpful info. I created a dynamic list with VBA code in the Index tab. I found that it only updates when I click back to the Index tab, though. Is there a way to ensure it auto updates as soon as a new tab is created? I refer to the tab names elsewhere in the workbook and others will be using it so I'm trying to make it seamless. Thank you!
This comment was minimized by the moderator on the site
Sorry, I do not find that code can finish your job.
This comment was minimized by the moderator on the site
Or you can simply rightClick either the left or right tab-horizontal-scroll arrow at the bottomLeft, and then click the worksheet name (from the simple vertical list) that you want to jump to.
This comment was minimized by the moderator on the site
Just what I needed and worked perfectly. Thank you!
This comment was minimized by the moderator on the site
Defining the name "Sheets" in the define name DOES NOT WORK. The "refers to" box will not save the formula as typed and converts it to a text string.
This comment was minimized by the moderator on the site
how can I use this code to create the list of worksheets in horizontal order instead of vertical? is it possible?
This comment was minimized by the moderator on the site
Thank you. It is very useful. :D
This comment was minimized by the moderator on the site
How can i remove the links to each sheets and how to not include the "sheet1" and "Index" sheet? Private Sub Worksheet_Activate() 'Updateby20150305 Dim xSheet As Worksheet Dim xRow As Integer Dim calcState As Long Dim scrUpdateState As Long Application.ScreenUpdating = False xRow = 1 With Me .Columns(1).ClearContents .Cells(1, 1) = "INDEX" .Cells(1, 1).Name = "Index" End With For Each xSheet In Application.Worksheets If xSheet.Name Me.Name Then xRow = xRow + 1 With xSheet .Range("A1").Name = "Start_" & xSheet.Index .Hyperlinks.Add anchor: = .Range("A1"), Address: = "", _ SubAddress: = "Index", TextToDisplay: = "Back to Index" End With Me.Hyperlinks.Add anchor: = Me.Cells(xRow, 1), Address: = "", _ SubAddress: = "Start_" & xSheet.Index, TextToDisplay: = xSheet.Name End If Next Application.ScreenUpdating = True End Sub
This comment was minimized by the moderator on the site
How would I go about editing this code to include a checkbox to the left of the link that I could use to hide rows on a cover sheet? Also how could I insert a row on the worksheets below A1 to have the return to index link show up there?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations