Skip i'r prif gynnwys

Sut i greu taflenni gwaith dilyniant o ystod o gelloedd yn Excel?

Os oes gennych ystod o ddata yn eich taflen waith, ac yn awr, rydych chi am greu cyfres o daflenni gwaith yn seiliedig ar y data celloedd, gweler y screenshot canlynol. Wrth gwrs, gallwch olygu enw'r daflen waith fesul un â llaw, ond os oes sawl enw taflen waith mae angen eu golygu, bydd y ffordd hon yn drafferthus ac yn cymryd llawer o amser. Yma, byddaf yn siarad am rai triciau cyflym i'ch helpu chi.

doc-create-sheet-from-list1

Creu taflenni gwaith dilyniant o'r rhestr o gelloedd gyda chod VBA

Creu dilyniant taflenni gwaith o restr o gelloedd gyda Kutools ar gyfer Excel


swigen dde glas saeth Creu taflenni gwaith dilyniant o'r rhestr o gelloedd gyda chod VBA

Gall y cod VBA canlynol eich helpu i ychwanegu rhai taflenni gwaith a enwir yn seiliedig ar gynnwys y gell ar ôl taflenni gwaith sy'n bodoli eisoes. Gwnewch fel hyn:

1. Daliwch i lawr y ALT + F11 allweddi, yna mae'n agor y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.

2. Cliciwch Mewnosod > Modiwlau, a gludwch y cod canlynol yn y Ffenestr Modiwl.

Cod VBA: ychwanegu taflenni gwaith dilyniant yn seiliedig ar restr y celloedd

Sub CreateWorkSheetByRange()
'Update 20130829
Dim WorkRng As Range
Dim Ws As Worksheet
Dim arr As Variant
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
arr = WorkRng.Value
Application.ScreenUpdating = False
For i = 1 To UBound(arr, 1)
    For j = 1 To UBound(arr, 2)
        Set Ws = Worksheets.Add(after:=Application.ActiveSheet)
        Ws.Name = arr(i, j)
    Next
Next
Application.ScreenUpdating = True
End Sub

3. Yna pwyswch F5 allwedd i redeg y cod hwn, ac yna bydd blwch prydlon yn cael ei ddewis i chi ddewis yr ystod rydych chi am ei defnyddio. Gweler y screenshot:

doc-create-sheet-from-list2

4. Ac yna cliciwch OK, ychwanegwyd y taflenni gwaith a enwir gan y gwerthoedd celloedd ar ôl y daflen waith bresennol. Gweler y screenshot:

doc-create-sheet-from-list3

Nodiadau:

1. Bydd y taflenni gwaith newydd yn cael eu mewnosod ar ôl y daflen waith gyfredol.

2. Os oedd yr ystod a ddewiswyd yn cynnwys celloedd gwag, enwir y taflenni gwaith yn seiliedig ar ragosodiad. Gweler sgrinluniau:

doc-create-sheet-from-list4
-1
doc-create-sheet-from-list5

swigen dde glas saeth Creu dilyniant taflenni gwaith o restr o gelloedd gyda Kutools ar gyfer Excel

Yma, rwy'n cyflwyno teclyn defnyddiol-Kutools ar gyfer Excel, Gyda'i Creu Taflenni Gwaith Dilyniant, gallwch chi greu taflenni gwaith yn gyflym gydag enw'r mis, enw'r dydd, y rhestr arfer ac ati.

Kutools ar gyfer Excel yn cynnwys mwy na 300 o offer Excel defnyddiol. Am ddim i geisio heb unrhyw gyfyngiad mewn 30 diwrnod. Get it Now.

Ar ôl gosod Kutools ar gyfer Excel, gwnewch y camau canlynol:

1. Dewiswch yr ystod rydych chi am greu taflenni gwaith yn seiliedig arni.

2. Cliciwch Menter > Offer Taflen Waith > Creu Taflenni Gwaith Dilyniant, gweler y screenshot:

doc-create-sheet-from-list6

3. Yn y Creu Taflenni Gwaith Dilyniant blwch deialog, dewiswch y math o daflen waith rydych chi am greu'r taflenni gwaith dilyniant newydd, ac yna gwiriwch Data mewn ystod opsiwn, gweler y screenshot:

doc-create-sheet-from-list7

4. Yna cliciwch OK i gau'r blwch deialog, ac mae llyfr gwaith newydd sy'n cynnwys y taflenni gwaith wedi'u henwi gan y data amrediad a ddewiswyd. Gweler y screenshot:

doc-create-sheet-from-list8

Nodiadau:

1. Os dewiswch Daflen 1 neu Daflen 2, bydd y taflenni gwaith newydd yn cael eu creu yr un fformat â Thaflen 1 neu Daflen 2.

2. Mae'r taflenni gwaith newydd yn cael eu creu mewn llyfr gwaith newydd.

3. Os oedd yr ystod a ddewiswyd yn cynnwys celloedd gwag, enwir y taflenni gwaith yn seiliedig ar ragosodiad. Gweler sgrinluniau:

doc-create-sheet-from-list9
-1
doc-create-sheet-from-list10

Cliciwch i wybod mwy am y nodwedd Creu Taflenni Gwaith Dilyniant hwn.


Erthygl gysylltiedig:

Sut i Ychwanegu Taflenni Gwaith Newydd gydag Enwau wedi'u Customized yn Excel?

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How to add bydefault table with row name and column name on sheets after creating sheets using command button. Please help.
This comment was minimized by the moderator on the site
How can the code be modified to copy a worksheet labeled "Template" and rename it to the values in the list selected in the range? I tried modifying the "worksheets.Add" code to "Worksheets("Template").Copy but it just makes copies with the worksheets labeled "Template(1)", "Template(2)", etc. Also, is there a way to put the tabs in numerical order as they are added?
This comment was minimized by the moderator on the site
Hi, Would it be possible to set-up a template for the new sheets created, instead of blank worksheets. Thanks Dave
This comment was minimized by the moderator on the site
Hi, I want to create invoices using excel and need to know whether is there a way to auto generate the second continuation page when the items on the first page exceed the A4 page layout that I have predefined? Any help is appreciated.
This comment was minimized by the moderator on the site
Could you modify the VBA code so that if the worksheet exists, it is skipped over? As it exists now, running the code a second time on the same range will create numbered worksheets. Thanks! Chris
This comment was minimized by the moderator on the site
Hello, Can I exclude blanks and automatically copy data with is behind the name? This data is generated from a pivot and I want to have all the names in different tabs with the data behind it in the layout. name1 data data data blank data data data blank Name 2 Thanks!
This comment was minimized by the moderator on the site
I need to duplicate one sheet when making all these new sheets from a list. Can you add the code for that? Thanks!
This comment was minimized by the moderator on the site
You can right click the tab and choose "move or copy" to duplicate it.
This comment was minimized by the moderator on the site
Very useful. thank you
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations