Consejo: Otros idiomas son traducidos por Google. Puedes visitar el English versión de este enlace.
Iniciar sesión
x
or
x
x
Suscríbete
x

or

¿Cómo dividir un libro de trabajo para separar los archivos de Excel en Excel?

Es posible que necesite dividir un libro de trabajo grande para separar los archivos de Excel con guardar cada hoja de trabajo del libro de trabajo como un archivo de Excel individual. Por ejemplo, puede dividir un libro de trabajo en varios archivos de Excel individuales y luego entregar cada archivo a otra persona para que lo maneje. Al hacerlo, puede lograr que ciertas personas manejen datos específicos y mantengan la seguridad de sus datos. Este artículo presentará formas de dividir un libro de trabajo grande para separar los archivos de Excel basados ​​en cada hoja de trabajo.

  1. Divida un libro de trabajo para separar los archivos de Excel con copiar y pegar
  2. Divida un libro de trabajo para separar los archivos de Excel con la función Mover o Copiar
  3. Divida un libro de trabajo para separar los archivos de Excel con el código VBA
  4. Divida un libro de trabajo para separar archivos de Excel / PDF / CSV / TXT con Kutools para Excel fácilmente

Divida rápidamente un libro de trabajo para separar los archivos Excel / PDF / TXT / CSV en Excel

Normalmente podemos dividir un libro de trabajo en archivos de Excel individuales con el Mover o copiar Característica en Excel. Pero Kutools para Excel Libro de trabajo dividido La utilidad puede ayudarlo a dividir fácilmente un libro y guardar cada hoja de cálculo como un archivo o libro PDF / TEXT / CSV separado en Excel. Prueba completa de funciones gratuitas 30-day!
libro de trabajo de división de anuncios excel

Kutools for Excel - Incluye más de útiles herramientas 300 para Excel. Prueba gratuita de funciones completas 30-day, ¡no se requiere tarjeta de crédito! CONSÍGUELO AHORA

Ficha Office Habilite la edición y navegación con pestañas en Office y haga su trabajo mucho más fácil ...
Kutools for Excel resuelve la mayoría de sus problemas y aumenta su productividad en un 80%
  • Reutilizar cualquier cosa: Agregue las fórmulas más utilizadas o complejas, gráficos y cualquier otra cosa a sus favoritos, y reutilícelos rápidamente en el futuro.
  • Más de características de texto 20: Extraer número de la cadena de texto; Extraer o eliminar parte de los textos; Convierta números y monedas a palabras en inglés.
  • Herramientas de fusión: Múltiples libros de trabajo y hojas en uno; Fusionar múltiples celdas / filas / columnas sin perder datos; Fusionar filas duplicadas y suma.
  • Herramientas divididas: Dividir datos en varias hojas en función del valor; Un libro de trabajo para múltiples archivos Excel, PDF o CSV; Una columna a varias columnas.
  • Saltar pasta Filas ocultas / filtradas; Cuenta y suma por color de fondo; Enviar correos electrónicos personalizados a múltiples destinatarios a granel.
  • Súper filtro: Cree esquemas de filtro avanzados y aplique a cualquier hoja; Tipo de Propiedad por semana, día, frecuencia y más; Filtrar por negrita, fórmulas, comentario ...
  • Más de potentes funciones de 300; Funciona con Office 2007-2019 y 365; Soporta todos los idiomas; Fácil implementación en su empresa u organización.

Divida un libro de trabajo para separar los archivos de Excel con copiar y pegar


En usual, usando copia mando y Pasta comando puede guardar un libro de trabajo como un archivo de Excel separado manualmente. En primer lugar, seleccione la hoja de trabajo completa que desea guardar como un archivo separado, cree un nuevo libro de trabajo y luego péguelo en el nuevo libro de trabajo, al final lo guarda.

Esta es una forma fácil de usar si necesita dividir solo algunas hojas de trabajo como archivos separados. Sin embargo, debe llevar mucho tiempo y ser tedioso dividir muchas hojas de trabajo copiando y pegando manualmente.


Divida un libro de trabajo para separar los archivos de Excel con la función Mover o Copiar

Este método introducirá la función Mover o Copiar para mover o copiar las hojas seleccionadas a un nuevo libro y guardarlas como un libro separado. Por favor, haga lo siguiente:

1. Seleccione las hojas en la barra de pestañas de la hoja, haga clic con el botón derecho y seleccione Mover o copiar desde el menú contextual. Ver captura de pantalla:

Nota: Holding Ctrl clave, puede seleccionar varias hojas no adyacentes haciendo clic en ellas una por una en la barra de pestañas de la Hoja; participación cambio Con la tecla, puede seleccionar varias hojas adyacentes haciendo clic en la primera y la última en la barra de pestañas de la hoja.

2. En el cuadro de diálogo Mover o Copiar, seleccione (Nuevo libro) del Reservar lista desplegable, revise el Crea una copia opción, y haga clic en OK botón. Ver captura de pantalla:

3. Ahora todas las hojas seleccionadas se copian en un nuevo libro de trabajo. Hacer clic Envíe el > AHORRE para guardar el nuevo libro de trabajo.


Divida un libro de trabajo para separar los archivos de Excel con el código VBA

El siguiente código de VBA puede ayudarlo a dividir rápidamente varias hojas de trabajo del libro de trabajo actual en archivos Excel separados, haga lo siguiente:

1. Cree una nueva carpeta para el libro de trabajo que desea dividir, porque los archivos divididos de Excel permanecerán en la misma carpeta que este libro maestro.

2. Mantenga presionado el ALT + F11 teclas en Excel, y abre el Microsoft Visual Basic para aplicaciones ventana.

3. Hacer clic recuadro > Móduloy pegue el siguiente código en la Ventana del Módulo.

VBA: divida un libro de trabajo en varios libros y guárdelo en la misma carpeta

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. presione el F5 clave para ejecutar este código Y el libro de trabajo se divide para separar los archivos de Excel en la misma carpeta con el libro de trabajo original. Ver captura de pantalla:

Nota: Si una de las hojas tiene el mismo nombre con el libro, este VBA no puede funcionar.


Divida un libro de trabajo para separar archivos de Excel / PDF / CSV / TXT con Kutools para Excel fácilmente

Si usted tiene Kutools for Excel instalado, es Libro de trabajo dividido La herramienta puede dividir varias hojas de trabajo como archivos separados de Excel de manera conveniente y rápida con solo unos pocos clics.

Kutools for Excel - Incluye más de útiles herramientas 300 para Excel. Prueba gratuita de funciones completas 30-day, ¡no se requiere tarjeta de crédito! CONSÍGUELO AHORA

1. Después de instalar Kutools for Excel, haga clic Kutools Más > Libro de trabajo dividido , mira la captura de pantalla:

2. En la Libro de trabajo dividido cuadro de diálogo, realice las siguientes operaciones:
(1) Todos los nombres de las hojas de trabajo se verifican de forma predeterminada. Si no desea dividir algunas de las hojas de trabajo, puede desmarcarlas;
(2) Compruebe la Guardar un tipo opción;
(3) Desde el Guardar como tipo desplegable, elija un tipo de archivo que quiera dividir y guardar.
(4) Luego haz clic Mini Split botón.

Nota: Si desea evitar dividir las hojas de cálculo ocultas o en blanco, puede verificar Saltar hojas de trabajo ocultas or Saltar hojas de trabajo en blanco encajonar.

3. En el cuadro de diálogo Buscar carpeta, especifique una carpeta de destino para guardar los archivos separados divididos y haga clic en OK botón.

Ahora las hojas de trabajo comprobadas se guardan como nuevos libros separados. Cada libro nuevo se nombra con el nombre original de la hoja de trabajo. Ver captura de pantalla:

Kutools for Excel's Libro de trabajo dividido La herramienta facilita la división del libro activo en archivos individuales de Excel (un archivo contiene una hoja de cálculo), archivos CSV, archivos TXT o archivos PDF, según sea necesario. Puede configurar para omitir todas las hojas de cálculo ocultas y en blanco. ¡Tenga una prueba gratis!


Demostración: divida o guarde cada hoja de trabajo de un libro de trabajo como archivos separados de excel / txt / csv / pdf

Kutools for Excel incluye más de 300 útiles herramientas para Excel, gratuitas para probar sin limitación en los días de 30. Descargar y prueba gratuita ahora!

Artículos relacionados:


Kutools for Excel resuelve la mayoría de sus problemas y aumenta su productividad en un 80%

  • Reutilizar: Insertar rápidamente fórmulas complejas, gráficos y cualquier cosa que hayas usado antes; Cifrar celdas con contraseña Crear una lista de correo y enviar correos electrónicos ...
  • Super Formula Bar (edite fácilmente varias líneas de texto y fórmula); Diseño de lectura (lee y edita fácilmente un gran número de celdas); Pegar en rango filtrado...
  • Combinar celdas / filas / columnas sin perder datos; Contenido de celdas divididas; Combinar filas / columnas duplicadas... Prevenir células duplicadas; Comparar rangos...
  • Seleccione Duplicado o Único Filas; Seleccionar filas en blanco (todas las celdas están vacías); Super Find y Fuzzy Find en muchos libros de trabajo; Selección aleatoria ...
  • Copia exacta Celdas múltiples sin cambiar la referencia de fórmula; Crear referencias automáticamente a múltiples hojas; Insertar viñetas, Casillas de verificación y más ...
  • Extracto del texto, Agregar texto, Eliminar por posición, Eliminar espacio; Crear e imprimir subtotales de paginación; Convertir entre contenido de celdas y comentarios...
  • Súper filtro (guardar y aplicar esquemas de filtro a otras hojas); Clasificación avanzada por mes / semana / día, frecuencia y más; Filtro especial por negrita, cursiva ...
  • Combinar libros de trabajo y hojas de trabajo; Combinar tablas basadas en columnas clave; Dividir datos en varias hojas; Conversión por lotes xls, xlsx y PDF...
  • Más de potentes funciones de 300. Admite Office / Excel 2007-2019 y 365. Soporta todos los idiomas. Fácil implementación en su empresa u organización. Funciones completas de prueba gratuita de 30-day.
pestaña kte 201905

Office Tab lleva la interfaz con pestañas a Office y hace que su trabajo sea mucho más fácil

  • Habilitar la edición y lectura con pestañas en Word, Excel, PowerPoint, Editor, Acceso, Visio y Proyecto.
  • Abra y cree varios documentos en nuevas pestañas de la misma ventana, en lugar de en nuevas ventanas.
  • ¡Aumenta tu productividad en un 50% y reduce cientos de clics de ratón por ti todos los días!
fondo officetab
Say something here...
symbols left.
You are guest ( Sign Up? )
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.
    Gregory Dorvil · 1 months 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 months 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 months 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.
    Влад · 4 months ago
    Спасибо большое, всё работает.
  • To post as a guest, your comment is unpublished.
    Denise · 6 months 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 · 5 months 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 · 7 months 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 · 8 months ago
    Thank you!
  • To post as a guest, your comment is unpublished.
    M. Rameez · 10 months ago
    I found this really help full. Thanks! :)
  • To post as a guest, your comment is unpublished.
    alfonso · 11 months ago
    getting runtime error 1004
    • To post as a guest, your comment is unpublished.
      Christopher Lacey · 5 months 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 months 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 · 1 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.
    Ronnie · 1 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 · 11 months 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 Smith · 1 years ago
    Please disregard my previous post. I have resolved my issue.
  • To post as a guest, your comment is unpublished.
    Judy Smith · 1 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 · 1 years ago
    That really helped. Thank you.
  • To post as a guest, your comment is unpublished.
    Gabriel · 1 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 · 1 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 · 2 years ago
    Hi, can I add or modify the filename?
  • To post as a guest, your comment is unpublished.
    CMG · 2 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.
    MAB · 2 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 · 2 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 · 2 years ago
      You may need to change ".xlsx" on line 9 to ".xls" instead
      • To post as a guest, your comment is unpublished.
        Eben · 2 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 · 9 months 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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. · 2 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 · 3 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 · 3 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 · 3 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 · 3 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 · 2 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 · 3 years ago
    Used this and it worked. Just what I needed. Thanks
  • To post as a guest, your comment is unpublished.
    Jignesh S Thakrar · 3 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 · 3 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 · 3 years ago
    VBA script worked like a charm, got my 80+ new excel files
  • To post as a guest, your comment is unpublished.
    shanojirao · 3 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 · 3 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 · 3 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 · 3 years ago
    Thanks for your valuable support
  • To post as a guest, your comment is unpublished.
    Stephanie · 3 years ago
    The VBA code worked beautifully! It saved me so much time. Thank you for sharing!
  • To post as a guest, your comment is unpublished.
    Adrian Rees · 3 years ago
    Thanks, vba code worked perfectly! Saved me a lot of time splitting a spreadsheet with 25 tabs into different files.

    Only thing i picked up is in the 6th last line i changed the file format to new Excel "xlsx"

    " & xWs.Name & ".xls" becomes >>>>> " & xWs.Name & ".xlsx"
  • To post as a guest, your comment is unpublished.
    Herb · 3 years ago
    Thanks for the VBA code!!. It worked perfectly. Saved me much work!!
  • To post as a guest, your comment is unpublished.
    NG · 3 years ago
    Hi there,

    Thank you so much for the code, however may how you would add to the code if you wanted the following to happen?
    1. What if you wanted Sheet 1 to be copied as well for each additional sheets?

    For example, the newly created
    1. "Sheet 2" would have "Sheet 1 and Sheet 2"
    2. "Sheet 3" would have "Sheet 1 and Sheet 3"

    and so on and so forth.

    Appreciate if you could provide any help with this. Thank you.
  • To post as a guest, your comment is unpublished.
    zirokl · 4 years ago
    Thank you so much for this! It is amazing, works perfectly.

    But is it possible to modify it so it saves each worksheet to the same directory(without creating a new folder) based on original file name or particular Cell Value? Just by adding (1), (2) ets at the end of each exported file.

    Greatly appreciate your help.
  • To post as a guest, your comment is unpublished.
    NG · 4 years ago
    you saved my day with this code!!
  • To post as a guest, your comment is unpublished.
    Ovi · 4 years ago
    Is there a way I can apply the split to many excel files at once? The files have the same 2 sheets (as format and name).
    Thank you!
  • To post as a guest, your comment is unpublished.
    Brian · 4 years ago
    Hello, Thank you; super helpful. I was curious how to edit the save directory. When I run this code, it saves one directory up from the directory the original file is saved. Can someone please tell me how to make it save to the source file's directory?
  • To post as a guest, your comment is unpublished.
    Sam · 4 years ago
    I am having data for all the 365 days for 14 year in one excel sheet.

    Now we want to separate the data year wise (Ex. one excel file for year 2002 in that 12 Sheet ie for 12 month and another excel file for year 2003 in that 12 Sheet ie for 12 month).

    We are able to separate month wise data (by using Excel Kutools - Split Data) and it will create excel sheet for each month (ie it will create totally 24 sheets) and then we should Split to Workbook and it will be 24 excel file and again we should combine 12 file for each year. This is taking lot of time.

    Now our problem is while splitting the date we want Excel to create Year wise Excel files and in each excel file 12 sheets for 12 months. Can we do this in same time.

    Please tell us because we are having lots of data and it is taking lot of time.
  • To post as a guest, your comment is unpublished.
    Caroline · 4 years ago
    Hi - I have a work sheet with a lot of data that I need to split into separate sheets so I can attach and email to various people. Do you know how I would go about this? I have a TOTAL cell for each batch of data that I need to split, not all the batches contain the same number of lines. Any help you can give would be greatly appreciated. Thank you.