Note: The other languages of the website are Google-translated. Back to English
Logáil isteach  \/ 
x
or
x
Cláraigh  \/ 
x

or

Conas leabhar oibre a roinnt chun comhaid Excel a scaradh in Excel?

B’fhéidir go mbeidh ort leabhar oibre mór a roinnt chun comhaid Excel a scaradh le gach bileog oibre den leabhar oibre a shábháil mar chomhad Excel aonair. Mar shampla, is féidir leat leabhar oibre a roinnt ina iliomad comhad Excel aonair agus ansin gach comhad a sheachadadh chuig duine difriúil chun é a láimhseáil. Trí sin a dhéanamh, féadfaidh tú a chur ar dhaoine áirithe sonraí faoi leith a láimhseáil, agus do chuid sonraí a choinneáil slán. Tabharfaidh an t-alt seo bealaí isteach chun leabhar mór oibre a roinnt chun comhaid Excel a scaradh bunaithe ar gach bileog oibre.

  1. Roinn leabhar oibre chun comhaid Excel a scaradh le cóipeáil agus pasting
  2. Roinn leabhar oibre chun Comhaid Excel a scaradh le gné Bog nó Cóipeáil
  3. Roinn leabhar oibre chun comhaid Excel a scaradh le cód VBA
  4. Roinn leabhar oibre chun comhaid Excel / PDF / CSV / TXT a scaradh le Kutools for Excel go héasca

Roinn leabhar oibre chun comhaid Excel a scaradh le cóipeáil agus pasting

I ngnáthnós, ag úsáid Cóipeáil ordú agus Greamaigh is féidir le hordú leabhar oibre a shábháil mar chomhad Excel ar leithligh de láimh. Ar dtús, roghnaigh an bhileog oibre iomlán a theastaíonn uait a shábháil mar chomhad ar leithligh, cruthaigh leabhar oibre nua, agus ansin greamaigh é sa leabhar oibre nua, ag an deireadh sábhálfaidh sé é.

Is bealach éasca le húsáid é seo mura gá duit ach cúpla bileog oibre a roinnt mar chomhaid ar leithligh. Mar sin féin, caithfidh sé a bheith Tógann am agus tedious go leor bileoga oibre a roinnt le cóipeáil agus pasting de láimh.


Roinn leabhar oibre chun Comhaid Excel a scaradh le gné Bog nó Cóipeáil

Tabharfaidh an modh seo an ghné Bog nó Cóipeáil isteach chun na bileoga roghnaithe a bhogadh nó a chóipeáil chuig leabhar oibre nua agus sábháil mar leabhar oibre ar leithligh iad. Déan mar a leanas le do thoil:

1. Roghnaigh na bileoga sa bharra cluaisín Bileog, cliceáil ar dheis, agus roghnaigh Bog nó Cóipeáil ón roghchlár comhthéacs. Féach an pictiúr:

nótaí: Sealbhú Ctrl eochair, is féidir leat iliomad bileoga neamh-in aice láimhe a roghnú agus iad a chliceáil ceann ar cheann sa bharra cluaisín Bileog; gabháltas Shift eochair, is féidir leat iliomad bileoga cóngaracha a roghnú trí chliceáil ar an gcéad cheann agus an ceann deireanach sa bharra cluaisín Bileog.

2. Sa dialóg Bog nó Cóipeáil, roghnaigh (leabhar nua) ó na A chur in áirithe liosta anuas, seiceáil an Cruthaigh cóip rogha, agus cliceáil ar an OK cnaipe. Féach an pictiúr:

3. Anois cóipeáiltear gach bileog roghnaithe chuig leabhar oibre nua. Cliceáil Comhad > Sábháil chun an leabhar oibre nua a shábháil.

Roinn leabhar oibre go tapa chun comhaid Excel / PDF / TXT / CSV a scaradh in Excel

De ghnáth is féidir linn leabhar oibre a roinnt ar chomhaid Excel aonair leis an Bog nó Cóipeáil gné in Excel. Ach Kutools do Excel's Leabhar Oibre Scoilt is féidir le fóntais cabhrú leat leabhar oibre a roinnt go héasca agus gach bileog oibre a shábháil mar chomhad nó leabhar oibre PDF / TEXT / CSV ar leithligh in Excel. Triail Saor in Aisce Gné Iomlán 30 lá!
leabhar oibre scoilt ar fheabhas

Kutools le haghaidh Excel - Cuimsíonn sé níos mó ná 300 uirlis áisiúil le haghaidh Excel. Triail saor in aisce gné iomlán 30 lá, níl aon chárta creidmheasa ag teastáil! Get sé anois

Roinn leabhar oibre chun comhaid Excel a scaradh le cód VBA

Is féidir leis an gcód VBA seo a leanas cabhrú leat iliomad bileoga oibre den leabhar oibre reatha a roinnt go tapa chun comhaid Excel a scaradh, déan mar a leanas le do thoil:

1. Cruthaigh fillteán nua don leabhar oibre a theastaíonn uait a roinnt, toisc go bhfanfar na comhaid scoilte Excel ag an bhfillteán céanna leis an máistirleabhar oibre seo.

2. Coinnigh síos an ALT + F11 eochracha in Excel, agus osclaíonn sé an Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

3. Cliceáil Ionsáigh > Modúil, agus greamaigh an cód seo a leanas i bhFuinneog an Mhodúil.

VBA: Roinn leabhar oibre ina iliomad leabhar oibre agus sábháil san fhillteán céanna é

Sub Splitbook()
'Updateby20140612
Dim xPath As String
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xWs In ThisWorkbook.Sheets
    xWs.Copy
    Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx"
    Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

4. Brúigh an F5 eochair chun an cód seo a rith. Agus roinntear an leabhar oibre chun comhaid Excel a scaradh san fhillteán céanna leis an mbunleabhar oibre. Féach an pictiúr:

nótaí: Má tá an t-ainm céanna ar cheann de na bileoga leis an leabhar oibre, ní féidir leis an VBA seo oibriú.

Roinn leabhar oibre chun comhaid Excel / PDF / CSV / TXT a scaradh le Kutools for Excel go héasca

Má tá tú Kutools le haghaidh Excel suiteáilte, a Leabhar Oibre Scoilt is féidir leis an uirlis bileoga oibre iolracha a roinnt mar chomhaid Excel ar leithligh go caothúil agus go tapa gan ach cúpla cad a tharlaíonn.

Kutools le haghaidh Excel - Cuimsíonn sé níos mó ná 300 uirlis áisiúil le haghaidh Excel. Triail saor in aisce gné iomlán 30 lá, níl aon chárta creidmheasa ag teastáil! Get sé anois

1. Tar éis a shuiteáil Kutools le haghaidh Excel, Cliceáil Kutools Plus > Leabhar Oibre Scoilt , féach ar an scáileán:

2. Sa an Leabhar Oibre Scoilt bosca dialóige, déan na hoibríochtaí seo a leanas:
(1) Seiceáiltear gach ainm bileog oibre de réir réamhshocraithe. Mura dteastaíonn uait cuid de na bileoga oibre a roinnt, is féidir leat iad a dhísheiceáil;
(2) Seiceáil an Sábháil cineál rogha;
(3) Ón Ach amháin mar chineál titim anuas, roghnaigh cineál comhaid amháin a theastaíonn uait a scoilt agus a shábháil.
(4) Ansin cliceáil Scoilt cnaipe.

nótaí: Más mian leat scoilt na mbileog oibre i bhfolach nó bán a sheachaint, is féidir leat an Scipeáil bileoga oibre i bhfolach or Scipeáil bileoga oibre bán bosca.

3. Sa dialóg Brabhsáil Chun Fillteán, sonraigh fillteán ceann scríbe le do thoil chun na comhaid scoilte ar leithligh a shábháil, agus cliceáil ar an OK cnaipe.

Anois sábhálfar na bileoga oibre seiceáilte mar leabhair oibre scartha nua. Ainmnítear gach leabhar oibre nua leis an ainm bunaidh bileog oibre. Féach an pictiúr:

Kutools le haghaidh Excel's Leabhar Oibre Scoilt déanann uirlis éasca leabhar oibre gníomhach a roinnt i gcomhaid Excel aonair (tá bileog oibre amháin i gcomhad amháin), comhaid CSV, comhaid TXT, nó comhaid PDF de réir mar is gá duit. Is féidir leat socrú chun na bileoga oibre bán agus folaithe go léir a scipeáil. Bíodh Triail In Aisce agat!


Taispeántas: Roinn nó sábháil gach bileog oibre de leabhar oibre amháin mar chomhaid ar leithligh excel / txt / csv / pdf


Kutools le haghaidh Excel Cuimsíonn sé níos mó ná 300 uirlis áisiúil le haghaidh Excel, saor in aisce le triail gan teorainn i 30 lá. Íoslódáil agus Triail In Aisce Anois!

Earraí gaolmhara:


Na hUirlisí Táirgiúlachta Oifige is Fearr

Réitíonn Kutools for Excel an chuid is mó de do chuid Fadhbanna, agus Méadaíonn sé do Tháirgiúlacht 80%

  • Athúsáid: Cuir isteach go tapa foirmlí casta, cairteacha agus aon rud a d'úsáid tú roimhe seo; Cealla a Chriptiú le pasfhocal; Cruthaigh Liosta Ríomhphoist agus seol ríomhphoist ...
  • Barra Foirmle Super (cuir línte iolracha téacs agus foirmle in eagar go héasca); Leagan Amach Léitheoireachta (líon mór cealla a léamh agus a chur in eagar go héasca); Greamaigh go dtí an Raon Scagtha...
  • Cumaisc Cealla / Sraitheanna / Colúin gan Sonraí a chailleadh; Ábhar Cealla Scoilt; Comhcheangail Sraitheanna / Colúin Dúblacha... Cill Dúblach a Chosc; Déan comparáid idir Ranganna...
  • Roghnaigh Dúblach nó Uathúil Sraitheanna; Roghnaigh Blank Rows (tá na cealla uile folamh); Aimsigh Super agus Fuzzy Aimsigh i go leor Leabhar Oibre; Roghnaigh go randamach ...
  • Cóip Díreach Cealla Il gan tagairt fhoirmle a athrú; Tagairtí Cruthaigh Auto chuig Bileoga Il; Cuir Urchair isteach, Boscaí Seiceála agus go leor eile ...
  • Sliocht Téacs, Cuir Téacs leis, Bain de réir Poist, Bain Spás; Subtotals Paging a chruthú agus a phriontáil; Tiontaigh Idir Ábhar Cealla agus Tráchtanna...
  • Scagaire Super (scéimeanna scagaire a shábháil agus a chur i bhfeidhm ar bhileoga eile); Ard-Sórtáil de réir míosa / seachtaine / lae, minicíocht agus níos mó; Scagaire Speisialta le cló trom, iodálach ...
  • Comhcheangail Leabhair Oibre agus Bileoga Oibre; Cumaisc Táblaí bunaithe ar eochaircholúin; Roinn Sonraí i Ilbhileoga; Baisc Tiontaigh xls, xlsx agus PDF...
  • Níos mó ná 300 gné chumhachtach. Tacaíochtaí Office / Excel 2007-2019 agus 365. Tacaíonn sé le gach teanga. Imscaradh éasca i d’fhiontar nó d’eagraíocht. Gnéithe iomlána triail saor in aisce 30 lá. Ráthaíocht ar ais airgid 60 lá.
cluaisín kte 201905

Tugann Tab Oifige comhéadan Tabbed chuig Office, agus Déan Do Obair i bhfad Níos Éasca

  • Cumasaigh eagarthóireacht agus léamh tabbed i Word, Excel, PowerPoint, Foilsitheoir, Rochtain, Visio agus Tionscadal.
  • Oscail agus cruthaigh cáipéisí iolracha i gcluaisíní nua den fhuinneog chéanna, seachas i bhfuinneoga nua.
  • Méadaíonn do tháirgiúlacht 50%, agus laghdaíonn sé na céadta cad a tharlaíonn nuair luch duit gach lá!
bun officetab
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Waqa · 24 days ago
    xWs.Copy

    showing error in this area
  • To post as a guest, your comment is unpublished.
    Jakub · 3 months ago
    Hello, I just tried the split data function based on the first column (about 90 partners). Half of the worksheets are named correctly while the other just have number of the sheet eventhough there is name of the partner in the column. Any help, please?
  • To post as a guest, your comment is unpublished.
    Sudarshan · 9 months ago
    i have a data of 5 worksheets. Every worksheet has a common column (Branch). Can i convert the data into different excel files based on respective branches
    • To post as a guest, your comment is unpublished.
      kellytte · 9 months ago
      Hi Sudarshan,
      Kutools for Excel has an amazing feature – Split Data, which can quickly split data from a range or a sheet to multiple sheets based on values in the specified column. And these sheets are saved in a new workbook.

      You can apply the Split Data feature to split each sheet based on the specified common column.
      After splitting, you can apply the Combine Worksheets feature, also provided by Kutools for Excel, and combine all same name worksheets into one workbook.
  • To post as a guest, your comment is unpublished.
    prateeksha · 1 years ago
    excel which i want to split is having 3 spread sheet my requirement is to split the excel as per the sheet 1 and remaning to sheet to be contant when file split
    • To post as a guest, your comment is unpublished.
      kellytte · 1 years ago
      Hi prateeksha,
      In the fourth method on this webpage, the Split Workbook feature of Kutools for Excel is recommended, which will split every specified worksheet to individual PDF/CSV/TEXT/Workbooks.
  • To post as a guest, your comment is unpublished.
    Kevin · 1 years ago
    Hey there,
    I was wondering if we can use this macro to split the workbook into csv files
    I've changed the VBA as below, replacing "xlsx" with "csv", but it doesn't work:
    Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".csv"
    Thanks for your help!
    • To post as a guest, your comment is unpublished.
      kellytte · 1 years ago
      Hi Kevin,
      It recommends trying the fourth method to solve your problem. Kutools for Excel can be freely trial for 30 days. And the Split Workbook feature of Kutools for Excel can solve the problem easily.
  • To post as a guest, your comment is unpublished.
    exceluser25 · 1 years ago
    Very helpful code. Just had one question. How can I make these excel files read-only. I tried the below but it did not work.

    Application.ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
  • To post as a guest, your comment is unpublished.
    Denise Wood · 1 years ago
    Hello,
    Thank you so much for this code. I have used it a few additions successfully many times. However it will no longer work. It saves one file with the name Sheet 1 and it is blank. Any assistance would be greatly appreciated. Thank you!
  • To post as a guest, your comment is unpublished.
    Suraj · 1 years ago
    how can i undo it?
    I mean i split all the sheets, worked on it and now I want all the sheets just like before. PL help
  • To post as a guest, your comment is unpublished.
    Richie · 1 years ago
    Wow. This is a very nice elaboration. you saved the day.
  • To post as a guest, your comment is unpublished.
    Gerdy · 1 years ago
    If I wanted to split the workbook's collection worksheets by fives into workbooks, is that possible? Meaning, If I have 100 worksheets in a workbook, I want to automate using 5 worksheets at a time to make a workbook, which will end with 20 workbooks being made. How do you tweak the code to do this?
  • To post as a guest, your comment is unpublished.
    Gborka · 1 years ago
    VBA works. If not - Probable errors root cause: This VBA cannot handle HIDDEN SHEETS or if one of the sheets has the same name with the workbook.
    • To post as a guest, your comment is unpublished.
      kellytte · 1 years ago
      Hi Gborka,
      You can use the Split Workbook feature of Kutools for Excel, which can export hidden worksheets, and export all worksheets no matter what sheet names are.
  • To post as a guest, your comment is unpublished.
    Влад · 2 years ago
    Спасибо большое, всё работает.
  • To post as a guest, your comment is unpublished.
    Denise · 2 years ago
    Will this VBA work for Mac? It works perfectly for my PC but my manager uses a Mac.
    • To post as a guest, your comment is unpublished.
      Salim · 2 years ago
      Yes!! I just used it on Mac. However you will need to change some thing. The back slash into front slash /. I have already done it. Copy paste it. It will work. Let me know if it doesn't.

      Sub Splitbook()
      'Updateby20140612
      Dim xPath As String
      xPath = Application.ActiveWorkbook.Path
      Application.ScreenUpdating = False
      Application.DisplayAlerts = False
      For Each xWs In ThisWorkbook.Sheets
      xWs.Copy
      Application.ActiveWorkbook.SaveAs Filename:=xPath & "/" & xWs.Name & ".xlsx"
      Application.ActiveWorkbook.Close False
      Next
      Application.DisplayAlerts = True
      Application.ScreenUpdating = True
      End Sub
  • To post as a guest, your comment is unpublished.
    Ambarella · 2 years ago
    The version vba code is not working right, I have a "macros" file where I keep all my macros and have it open when I'm going to use them, and I'm running this one in the file that I need to be splitted but it splits the macros file.
  • To post as a guest, your comment is unpublished.
    User1 · 2 years ago
    Thank you!
  • To post as a guest, your comment is unpublished.
    M. Rameez · 2 years ago
    I found this really help full. Thanks! :)
  • To post as a guest, your comment is unpublished.
    alfonso · 2 years ago
    getting runtime error 1004
    • To post as a guest, your comment is unpublished.
      Christopher Lacey · 2 years ago
      I am as well, I have used this several times in the past but it is not working now
      • To post as a guest, your comment is unpublished.
        Gborka · 1 years ago
        1004 error root cause: This VBA cannot handle hidden sheets or if one of the sheets has the same name with the workbook.
  • To post as a guest, your comment is unpublished.
    Web7 · 2 years ago
    Does anyone know how to make this code work for a mac?
    It is showing an error when trying to locate the document.
    • To post as a guest, your comment is unpublished.
      Dan Turney · 2 years ago
      Change "\" to "/" worked for me. Wow!
  • To post as a guest, your comment is unpublished.
    Ronnie · 2 years ago
    Amazing script and instructions. Just saved me from splitting 30+Worksheets to separate files
    • To post as a guest, your comment is unpublished.
      Kim · 2 years ago
      Same! This worked perfectly for me. Saved me a lot of effort. Thank you!
  • To post as a guest, your comment is unpublished.
    judy.smith5919@gmail.com · 3 years ago
    Please disregard my previous post. I have resolved my issue.
  • To post as a guest, your comment is unpublished.
    judy.smith5919@gmail.com · 3 years ago
    I am using the split data into worksheets based on a column with 27 items in that column. The results are 54 worksheets 2 for each item. The only difference I can see is based on one of the columns in the range. For example:

    Once the split has occured, John Doe has 2 worksheets, one named John Doe and another named Sheet32. Each sheet has information for John Doe, but based on a column "Status" (Billed, Open Order, Salesforce), the information is split. The named worksheet has Billed & Open Order information and the Sheet32 has Salesforce information.


    Any idea what I am doing wrong?


  • To post as a guest, your comment is unpublished.
    Sreejith · 3 years ago
    That really helped. Thank you.
  • To post as a guest, your comment is unpublished.
    Gabriel · 3 years ago
    With the addition of code from comment below it works realy nice.
  • To post as a guest, your comment is unpublished.
    Paulo Corcino · 3 years ago
    Sub Splitbook()
    'Updateby20140612
    Dim xPath As String
    Dim Sourcewb As Workbook
    Dim Destwb As Workbook
    Dim xWs As Worksheet


    xPath = Application.ActiveWorkbook.Path
    Set Sourcewb = ActiveWorkbook

    With Application
    .ScreenUpdating = False
    .EnableEvents = False
    .Calculation = xlCalculationManual
    End With


    ' For Each xWs In ThisWorkbook.Sheets
    For Each xWs In Sourcewb.Worksheets

    If xWs.Visible = -1 Then
    xWs.Copy
    Set Destwb = ActiveWorkbook
    If Destwb.Sheets(1).ProtectContents = False Then
    With Destwb.Sheets(1).UsedRange
    .Cells.Copy
    .Cells.PasteSpecial xlPasteValues
    .Cells(1).Select
    End With
    Application.CutCopyMode = False
    End If
    With Destwb
    .SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx"
    .Close False
    End With
    End If
    Next

    With Application
    .ScreenUpdating = True
    .EnableEvents = True
    .Calculation = xlCalculationAutomatic
    End With

    MsgBox "You can find the files in " & xPath

    End Sub
  • To post as a guest, your comment is unpublished.
    Emmanuel · 3 years ago
    Hi, can I add or modify the filename?
  • To post as a guest, your comment is unpublished.
    CMG · 3 years ago
    Hi, can I get VBA to split a file with multiple tabs into separate files and save in their respective folders? i.e. If I have a report with 189 tabs each tab for different clients; can I separate those tabs and save each file in a folder specific to that client? The report varies with the number of tabs through out the month.
  • To post as a guest, your comment is unpublished.
    monica.arroyaveb@gmail.com · 3 years ago
    Hi - Can I get VBA to split a file with multiple tabs into files with multiple tabs? i.e. if I have a file with 2 tabs and data in both tabs with a field called customer -100 customers-, can I get VBA to create one file per customer -100 files- with two tabs each?
  • To post as a guest, your comment is unpublished.
    pippa hatt · 3 years ago
    help ive done this loads of times however today its saying an error on the Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx" what am i doing wrong
    • To post as a guest, your comment is unpublished.
      LR · 3 years ago
      You may need to change ".xlsx" on line 9 to ".xls" instead
      • To post as a guest, your comment is unpublished.
        Eben · 3 years ago
        It does that because of the spaces for indentation on lines 8 - 10. Also kept me busy a while to figure out why it's doing that now.
        • To post as a guest, your comment is unpublished.
          Mrs Phillipa L Hatt · 2 years ago
          been using this for a while and now having a run time error 1004 then highlighting in yellow line 8 xWs.copy any ideas please
  • To post as a guest, your comment is unpublished.
    Kelley · 3 years ago
    Hi - instead of splitting each worksheet into a new workbook, is there a way to split groups of worksheets into new workbooks? Ex. Sheet1, Sheet2, Sheet3 go into a workbook, and Sheet4, Sheet5, and Sheet6 go to a second workbook, rather than six new workbooks?
  • To post as a guest, your comment is unpublished.
    tony bones · 4 years ago
    need a vba code to copy an entire workbook (all tabs) and have files saved based on cell range name by state?
  • To post as a guest, your comment is unpublished.
    imran ch · 4 years ago
    thank you very much www.extendoffice.com . very simple and well define post
  • To post as a guest, your comment is unpublished.
    Chris · 4 years ago
    Hi, I have a document of 10 sheets, but I only want the same 8 sheets to copy out each time I hit the command button. What changes can I make to the code (bearing in mind I am a complete amateur in Excel) to get each sheet to adopt the name of the main file, then add the sheet name at the end?

    So as an example the file is called "TESTING" and it has a sheet called "EUROPE". When the macro runs, I want the Europe sheet to be copied out and called "TESTING - EUROPE.xls".
  • To post as a guest, your comment is unpublished.
    adnan · 4 years ago
    Hi
    The coding works well but I want the header also to come on each and every sheet. As it's skipped the header in all data...
  • To post as a guest, your comment is unpublished.
    Karissa Brandhagen · 4 years ago
    How can I get this .xlsx file to save as .csv when split?
  • To post as a guest, your comment is unpublished.
    Nikk · 4 years ago
    Thank you so much! It worked after I unhid the rest of the workbook. This is awesome!
  • To post as a guest, your comment is unpublished.
    Tomm · 4 years ago
    2 questions.

    1. How can you adjust the code the choose the file path of where it is saved? As opposed to just saving wherever the original file is.

    2. How do you change the code to choose what column it creates the tabs from (i.e. in this code it is reading out of column A). I want to be able to choose which column it reads off if. Thanks!
  • To post as a guest, your comment is unpublished.
    Jessica P. · 4 years ago
    Thank you very much for this.Saved me weeks of sweat...
     
    Regards:Jessica
    Active consumer on customerso
  • To post as a guest, your comment is unpublished.
    Anjali · 4 years ago
    Hi, i have one quarry i.e. i have 15000 lines of data in one excel sheet and i want to split that data into multiple excel files where as each file contains 99 lines of data. Anyone can help me. Please share your thoughts.....
  • To post as a guest, your comment is unpublished.
    DS · 4 years ago
    This VBA code worked perfectly. Thank you for sharing your wealth of knowledge.
  • To post as a guest, your comment is unpublished.
    Brad · 4 years ago
    The macro should be updated to include an unhide-all-worksheets piece (including the very-hidden worksheets):

    Sub UnhideAllSheets()
    'Unhide all sheets in workbook.
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
    ws.Visible = xlSheetVisible
    Next ws
    End Sub

    Sub Splitbook()
    'Updateby20140612
    Dim xPath As String
    xPath = Application.ActiveWorkbook.Path
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    For Each xWs In ThisWorkbook.Sheets
    xWs.Copy
    Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx"
    Application.ActiveWorkbook.Close False
    Next
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True
    End Sub
  • To post as a guest, your comment is unpublished.
    Brad · 4 years ago
    IT SHOULD BE NOTED THAT THE VBA MACRO ABOVE WON'T WORK IF YOU HAVE A HIDDEN EXCEL SHEET, OR A "VERY-HIDDEN" EXCEL SHEET.

    YOU MAY NOT BE AWARE THAT YOU HAVE A "VERY-HIDDEN" EXCEL SHEET. TO CHECK, HIT ALT+F11 TO OPEN MICROSOFT VISUAL BASIC (MACRO EDITOR). CLICK ON EACH WORKSHEET UNDER THE MICROSOFT EXCEL OBJECTS AND MAKE SURE THAT THE "Visible" ATTRIBUTE IN THE "Properties" SECTION SHOWS "-1 = xlSheetVisible". IF YOU SPIT AN EXCEL FILE OUT OF ORACLE, FOR EXAMPLE, YOU'LL SEE A WORKSHEET NAMED "BneLog" with visibility = "2 - xlSheetVeryHidden". This took me forever to figure out, lol. Hope it helps!
    • To post as a guest, your comment is unpublished.
      David · 4 years ago
      Great tip! I was beating my head against a wall until this occurred to me. I saw previous comments about hidden sheets but until I realized an existing macro was "very hidden", it didn't make sense to me. On to the next project!
  • To post as a guest, your comment is unpublished.
    sunil · 4 years ago
    Used this and it worked. Just what I needed. Thanks
  • To post as a guest, your comment is unpublished.
    Jignesh S Thakrar · 4 years ago
    Hi

    I'm have master file were data consist for multiple city would like know is their any macros or any formula which keeps this orignal file and also create & update new workbook city area wise
  • To post as a guest, your comment is unpublished.
    Snehalata Gupta · 4 years ago
    Hello all,

    I need to reciprocate the same thing.

    there are lots of excel sheets and i want it te 1st sheet of it in single work book,
    Please Help!!!!
  • To post as a guest, your comment is unpublished.
    Bakhty · 4 years ago
    VBA script worked like a charm, got my 80+ new excel files
  • To post as a guest, your comment is unpublished.
    shanojirao · 4 years ago
    Hi All,

    I need a help from you all,

    I've to share the reports to multiple team depending on the brands they work for.

    Eg: brand name:
    Apple
    Samsung
    and many more around 60 brands.

    there will be a sales dump.

    If I want to run a macro, and spilt into multiple excel files what would be the procedure.

    Kindly help me.

    Thanks in Advance.

    Regards,
    Shan
  • To post as a guest, your comment is unpublished.
    Rogier van Meggelen · 5 years ago
    The code works great. Can you also use this to save the tabs as pdf files.
    It can't figure this out :)
  • To post as a guest, your comment is unpublished.
    Rogier van Meggelen · 5 years ago
    The code works great! is it also possible to save the different tabs as a pdf? I tried but the i can't get it to work :)
  • To post as a guest, your comment is unpublished.
    Anandaraj.M · 5 years ago
    Thanks for your valuable support
  • To post as a guest, your comment is unpublished.
    Stephanie · 5 years ago
    The VBA code worked beautifully! It saved me so much time. Thank you for sharing!