Բաց թողնել հիմնական բովանդակությունը

Ինչպե՞ս ստեղծել բազմակի աշխատանքային թերթ բջիջների արժեքների ցուցակից:

Excel- ում բջջային արժեքների ցանկի հիման վրա մի քանի աշխատանքային թերթ ստեղծելու համար կա՞ն արագ կամ դյուրին մեթոդներ: Այս հոդվածում ես կխոսեմ այս աշխատանքը լուծելու մի քանի լավ հնարքների մասին:

VBA կոդով բջիջների արժեքների ցուցակից ստեղծեք բազմաթիվ աշխատանքային թերթեր

Excel- ի համար Kutools- ի միջոցով ստեղծեք բազմաթիվ աշխատանքային թերթեր բջիջների արժեքների ցուցակից


նետ կապույտ աջ պղպջակ VBA կոդով բջիջների արժեքների ցուցակից ստեղծեք բազմաթիվ աշխատանքային թերթեր

Բազմաթիվ նոր աշխատաթերթեր արագ ստեղծելու համար, որոնք նշված են բջիջների արժեքների ցուցակով, հետևյալ VBA կոդը կարող է օգնել ձեզ:

1, Պահեք պահեք ALT + F11 բացել ստեղները Microsoft Visual Basic հավելվածների համար պատուհան.

2: Սեղմեք Տեղադրել > Մոդուլներ, և տեղադրեք հետևյալ կոդը Մոդուլներ Պատուհանը:

VBA կոդ. Բջիջների ցանկից ստեղծեք բազմաթիվ աշխատանքային թերթեր.

Sub AddSheets()
'Updateby Extendoffice
    Dim xRg As Excel.Range
    Dim wSh As Excel.Worksheet
    Dim wBk As Excel.Workbook
    Set wSh = ActiveSheet
    Set wBk = ActiveWorkbook
    Application.ScreenUpdating = False
    For Each xRg In wSh.Range("A1:A7")
        With wBk
            .Sheets.Add after:=.Sheets(.Sheets.Count)
            On Error Resume Next
            ActiveSheet.Name = xRg.Value
            If Err.Number = 1004 Then
              Debug.Print xRg.Value & " already used as a sheet name"
            End If
            On Error GoTo 0
        End With
    Next xRg
    Application.ScreenUpdating = True
End Sub

ՆշումՎերոհիշյալ ծածկագրում A1: A7 այն բջիջների տիրույթն է, որի հիման վրա ցանկանում եք թերթեր ստեղծել, փոխեք այն ըստ ձեր կարիքի:

3, Դրանից հետո սեղմեք F5 այս կոդը գործարկելու բանալին, և նոր թերթերը ստեղծվել են ընթացիկ աշխատանքային գրքի բոլոր թերթերից հետո, տես նկարի նկարը.

doc ստեղծել բազմաթիվ թերթեր 1


նետ կապույտ աջ պղպջակ Excel- ի համար Kutools- ի միջոցով ստեղծեք բազմաթիվ աշխատանքային թերթեր բջիջների արժեքների ցուցակից

Եթե ​​դուք հմուտ չեք վերը նշված ծածկագրում, ահա մի հարմար գործիք-Excel- ի համար նախատեսված գործիքներԻր Ստեղծեք հաջորդականության աշխատանքային թերթեր գործառույթը, աշխատանքային թերթերը կստեղծվեն ՝ ելնելով նոր աշխատանքային գրքում բջիջների արժեքներից:

Excel- ի համար նախատեսված գործիքներ : ավելի քան 300 հարմար Excel հավելվածներով, 30 օրվա ընթացքում առանց սահմանափակումների փորձեք անվճար. 

Տեղադրելուց հետո Excel- ի համար նախատեսված գործիքներԽնդրում եմ արեք հետևյալ կերպ

1: Սեղմեք Kutools Plus > Աշխատանքային թերթիկ > Ստեղծեք հաջորդականության աշխատանքային թերթեր, տես նկարի նկարը.

2, Մեջ Ստեղծեք հաջորդականության աշխատանքային թերթեր երկխոսության տուփ:

(1.) Ընտրեք մեկ աշխատանքային թերթ, որի հիման վրա ցանկանում եք ստեղծել հաջորդականության թերթեր.

(2.) Ապա ընտրեք Ամսաթիվ միջակայքում գտնվող տարբերակից Թերթի անունները հիմնված են ցուցակի տուփը և կտտացրեք doc ստեղծել բազմաթիվ թերթեր 4 կոճակը ՝ բջջային արժեքները ընտրելու համար, որոնք ցանկանում եք օգտագործել:

doc ստեղծել բազմաթիվ թերթեր 3

3. Եվ այնուհետեւ կտտացրեք Ok կոճակը, աշխատանքային թերթերը ստեղծվել են բջջային արժեքների անվանումներով նոր աշխատանքային գրքում, տես նկարի նկարը.

doc ստեղծել բազմաթիվ թերթեր 5

Կտտացրեք ներբեռնման և անվճար փորձարկման Kutools- ի համար Excel- ը հիմա:

Գրասենյակի արտադրողականության լավագույն գործիքները

🤖 Kutools AI օգնականՀեղափոխություն կատարել տվյալների վերլուծության հիման վրա՝ Խելացի կատարում   |  Ստեղծեք ծածկագիր  |  Ստեղծեք հատուկ բանաձևեր  |  Վերլուծել տվյալները և ստեղծել գծապատկերներ  |  Invoke Kutools-ի գործառույթները...
Հանրաճանաչ հատկություններ: Գտեք, ընդգծեք կամ նույնականացրեք կրկնօրինակները   |  Deleteնջել դատարկ շարքերը   |  Միավորել սյունակները կամ բջիջները՝ առանց տվյալների կորստի   |   Կլոր առանց բանաձևի ...
Super Փնտրել: Բազմաթիվ չափանիշների VLookup    Բազմակի արժեք VLookup  |   VLookup բազմաթիվ թերթերում   |   Fuzzy Փնտրել ....
Ընդլայնված բացվող ցուցակ: Արագ ստեղծեք բացվող ցուցակը   |  Կախված բացվող ցուցակ   |  Բազմակի ընտրություն Drop Down ցուցակ ....
Սյունակի կառավարիչ: Ավելացրեք որոշակի քանակությամբ սյունակներ  |  Տեղափոխել սյունակները  |  Փոխարկել թաքնված սյունակների տեսանելիության կարգավիճակը  |  Համեմատեք միջակայքերը և սյունակները ...
Առանձնահատկություններ: Ցանցի կենտրոնացում   |  Դիզայնի տեսք   |   Մեծ Formula Bar    Աշխատանքային գրքույկի և թերթիկների կառավարիչ   |  Ռեսուրսների գրադարան (Ավտոմատ տեքստ)   |  Ամսաթիվ ընտրող   |  Միավորել աշխատանքային թերթերը   |  Գաղտնագրել/գաղտնազերծել բջիջները    Ուղարկեք նամակներ ըստ ցանկի   |  Սուպեր զտիչ   |   Հատուկ զտիչ (զտել թավ/շեղ/շեղված...) ...
Լավագույն 15 գործիքների հավաքածու12 Տեքստ Գործիքներ (Ավելացրեք տեքստ, Հեռացնել նիշերը, ...)   |   50+ Աղյուսակ Տեսակներ (Գանտի աղյուսակը, ...)   |   40+ Գործնական Բանաձեւեր (Հաշվարկել տարիքը ՝ ելնելով ծննդյան տարեդարձից, ...)   |   19 միացում Գործիքներ (Տեղադրեք QR կոդ, Տեղադրեք նկար ուղուց, ...)   |   12 Փոխարկում Գործիքներ (Բառեր համարներ, Արտարժույթի փոխակերպումը, ...)   |   7 Միաձուլում և պառակտում Գործիքներ (Ընդլայնված կոմբինատ տողեր, Պառակտված բջիջներ, ...)   |   ... եւ ավելին

Լրացրեք ձեր Excel-ի հմտությունները Kutools-ի հետ Excel-ի համար և փորձեք արդյունավետությունը, ինչպես երբեք: Kutools-ը Excel-ի համար առաջարկում է ավելի քան 300 առաջադեմ առանձնահատկություններ՝ արտադրողականությունը բարձրացնելու և ժամանակ խնայելու համար:  Սեղմեք այստեղ՝ Ձեզ ամենաշատ անհրաժեշտ հատկանիշը ստանալու համար...

Նկարագրություն


Office Tab- ը Tabbed ինտերֆեյսը բերում է Office, և ձեր աշխատանքը շատ ավելի դյուրին դարձրեք

  • Միացնել ներդիրներով խմբագրումը և ընթերցումը Word, Excel, PowerPoint- ով, Հրատարակիչ, Access, Visio և Project:
  • Բացեք և ստեղծեք բազմաթիվ փաստաթղթեր նույն պատուհանի նոր ներդիրներում, այլ ոչ թե նոր պատուհաններում:
  • Բարձրացնում է ձեր արտադրողականությունը 50%-ով և նվազեցնում մկնիկի հարյուրավոր սեղմումները ձեզ համար ամեն օր:
Comments (20)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi
I would like to copy my "Vorlage" spreadsheet as many times as my "Stände" spreadsheet specifies. At the same time, the new sheets are also to be named according to a list from the "Stände" spreadsheet (item A1:A85).
Thank you in advance!
This comment was minimized by the moderator on the site
hello skyyang
i have try this code but it is create blank sheet
i want copy of active sheets
any idea....
This comment was minimized by the moderator on the site
Et si la liste est mouvante? car si j'ajoute des éléments dois-je tout le temps réadapter le code?
Merci
This comment was minimized by the moderator on the site
Hello, Lucas
To solve your problem, please apply the below code:
Please right click the sheet tab, and select View Code, then copy and paste the code into the Sheet Code window.
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim xRg As Excel.Range
    Dim wSh As Excel.Worksheet
    Dim wBk As Excel.Workbook
    Dim xAddress As String
    Dim xWSH As Worksheet
    Dim xRgI As Range
    Set wSh = ActiveSheet
    Set wBk = ActiveWorkbook
    xAddress = "A2:A20"
    On Error Resume Next
    Set xRgI = Intersect(Range(xAddress), Target)
    If xRgI Is Nothing Then Exit Sub
    If Target.Value = "" Then Exit Sub
    Application.ScreenUpdating = False
    Set xWSH = wBk.Worksheets.Item(Target.Value)
    If xWSH Is Nothing Then
      Set xWSH = wBk.Worksheets.Add
        xWSH.Name = Target.Value
        If Err.Number = 1004 Then
            Debug.Print xRg.Value & " already used as a sheet name"
        End If
    End If
    wSh.Activate
    Application.ScreenUpdating = True
End Sub

https://www.extendoffice.com/images/stories/comments/comment-skyyang/2023-comment/doc-sheets-from-cells.png
After pasting the code, now, you can enter the content into the specified cells, and then press Enter key, the new sheet will be created automatically.
Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Thanks you for posting this.
but i have problem with this code it is add blank sheets i want to copy and add the sheets
any idea for this??
This comment was minimized by the moderator on the site
Hello, Niks,

To solve your problem, please apply the below code:
Please right click the sheet tab, and select View Code, then copy and paste the code into the Sheet Code window.
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim xRg As Range
    Dim wSh As Worksheet
    Dim wBk As Workbook
    Dim xAddress As String
    Dim xWSH As Worksheet
    Dim xRgI As Range
    
    Set wSh = ActiveSheet
    Set wBk = ActiveWorkbook
    xAddress = "A2:A20"
    
    On Error Resume Next
    Set xRgI = Intersect(Range(xAddress), Target)
    On Error GoTo 0
    
    If xRgI Is Nothing Then Exit Sub
    If Target.Value = "" Then Exit Sub
    
    Application.ScreenUpdating = False
    
    Set xWSH = Nothing
    On Error Resume Next
    Set xWSH = wBk.Worksheets(Target.Value)
    On Error GoTo 0
    
    If xWSH Is Nothing Then
        On Error Resume Next
        Set xWSH = wBk.Worksheets.Add(After:=wBk.Worksheets(wBk.Worksheets.Count))
        On Error GoTo 0
        
        If Not xWSH Is Nothing Then
            xWSH.Name = Target.Value
            wSh.Cells.Copy Destination:=xWSH.Cells(1, 1)
        End If
    End If
    
    wSh.Activate
    Application.ScreenUpdating = True
End Sub


After pasting the code, when a value is entered in the specified range, a new worksheet is created based on that value, and the entire content of the current worksheet is copied to the newly created worksheet.

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Thank you for posting this. I followed the directions and it worked perfectly.
This comment was minimized by the moderator on the site
I tried using the VBA code, it is creating "nameless" worksheets, so sheet1 , 2 , 3 and so on, rather than using the value in the cell as the sheet's name. I tried to fixed by changing the data type in the cell to text , same issue…


any ideas?
This comment was minimized by the moderator on the site
I had this issue. to correct: 1. only 31 characters allowed for worksheet names2. no special characters + = ( ) [ ] \ / , : etc...find and replace with a space
This comment was minimized by the moderator on the site
This is of great help. I could save so much time. Thank you so much for your time and for helping us with your wonderful code.
This comment was minimized by the moderator on the site
This works great, how could you incorporate a template into each created tab? i.e. copy and paste from a template into each newly created sheet
This comment was minimized by the moderator on the site
First time using VBA code in Excel. Worked perfectly on the first try. Thanks for posting this.
This comment was minimized by the moderator on the site
and it creates a lot of sheets even if the list is empty... what if i want to create sheets based on cells that have value?
This comment was minimized by the moderator on the site
Better version. This will delete created sheet if exist another sheet with the same name. And added inputbox to avoid from manual code modification to select range.


Sub AddSheetsFromCells()

Dim xRg As Range, wBk As Workbook
Set wBk = ActiveWorkbook

On Error GoTo Quit
Set dbRange = Application.InputBox("Range: ", "Select Range", _
Application.Selection.Address, Type:=8)

Application.ScreenUpdating = False
Application.DisplayAlerts = False

For Each xRg In dbRange
With wBk
.Sheets.Add After:=.Sheets(.Sheets.Count)
On Error Resume Next
ActiveSheet.Name = xRg.Value
If Err.Number = 1004 Then
Debug.Print Chr(34) & xRg.Value & Chr(34) & " already used as a sheet name"
.ActiveSheet.Delete
End If
On Error GoTo 0
End With
Next xRg

Application.ScreenUpdating = True
Application.DisplayAlerts = True
Quit:

End Sub
This comment was minimized by the moderator on the site
this is awesome...... thank-you very much .is there somewhere where there is a public repository for vba codes?
This comment was minimized by the moderator on the site
What if i wanted each newly created sheet to have a template pasted into it from a template sheet? The template would have formatting and formulas only

Thanks
This comment was minimized by the moderator on the site
i also need to know this. did u figure out ?
This comment was minimized by the moderator on the site
Sub UpdateMAPs()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("Team List")
LR = .Range("E" & Rows.Count).End(xlUp).Row
For i = 2 To LR
Sheets("Blank MAP").Copy Before:=Sheets("Blank MAP")
ActiveSheet.Name = .Range("E" & i).Value
Next i
End With
Application.ScreenUpdating = True
End Sub

this worked for me from https://www.mrexcel.com/forum/excel-questions/553308-copy-worksheet-rename-cell-value.html
This comment was minimized by the moderator on the site
This is amazing! Thank you so much!
This comment was minimized by the moderator on the site
This appears to work great for what I am attempting to do with one exception... It is creating blank worksheets... I want to create a copy of an existing worksheet for each row in another worksheet. Is there anyway to do that?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations