How To Split Excel Sheets Into Separate Files | Session 6

Поделиться
HTML-код
  • Опубликовано: 4 авг 2017
  • This video will show you how to separate excel sheets into separate files.
    Below VBA code can help to split multiple sheets of excel workbook to separate Excel files in very quick time :
    1. Copy your file in a new folder which you want to split, because the split Excel files will be created at the same folder as this master file.
    2. Press ALT + F11 keys on key board, and it opens the Microsoft Visual Basic Applications window.
    3. Click Insert tab and select Module, paste the below mentioned code in the Module Window.
    4. Press F5 key to run the commend, and the file is splited into separate Excel files in the same folder along with the original master file.
    Note: Name of Main master file and names of sheets has to be always different otherwise this command will not work.
    VBA Code :
    Sub Splitbook()
    'UpdatedbyTechtoday
    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

Комментарии • 63

  • @yunusdohad
    @yunusdohad 3 года назад +2

    I had a workbook with 20 sheets - your solution was magical

  • @cariwagner8625
    @cariwagner8625 3 года назад

    Thank you! Now I just need to filter on to seperate sheets first and maintain formatting! Great Video!!!

  • @LoanNguyen-dh1bx
    @LoanNguyen-dh1bx 4 года назад

    Thank you so much for the instructions! It works great!!

  • @vexzed
    @vexzed 2 месяца назад

    Thank you this is a fast and simple solution. Very helpful, much appreciated.

  • @ManojLouis
    @ManojLouis 3 года назад

    Thanq Techtoday. It was such a help today. Indebted 🙏

  • @Adejobiabiola
    @Adejobiabiola Год назад

    Thank you so much for this video, I have stressed myself a lot when wanting to split it

  • @ankitfreightcarrier1899
    @ankitfreightcarrier1899 4 года назад

    Thank you helped a lot!!

  • @KASC92
    @KASC92 Год назад

    God bless this person. I had so many sheets ;_; Thank you!!!!

  • @sandy00718
    @sandy00718 4 года назад +1

    thanks this was super helpful

  • @angeliamarkho8641
    @angeliamarkho8641 5 лет назад

    its really helping me, thankyou

  • @gonearpana6672
    @gonearpana6672 3 года назад +1

    Thank you. It helped.

  • @johnyouseph4038
    @johnyouseph4038 4 года назад

    thanks a lot, its helps me very well

  • @ry3800
    @ry3800 4 года назад

    it is the best one, I've subscribe in your great channel

  • @futurebuddy9859
    @futurebuddy9859 4 года назад

    superb sir thank you for the great information

  • @aniketyadav2646
    @aniketyadav2646 Месяц назад

    Thnx Buddy , it does work.

  • @gowrishm2564
    @gowrishm2564 5 лет назад

    thats a greate answer...thank you

  • @discoveryourself7861
    @discoveryourself7861 Год назад

    very very helpful thanks boss

  • @sumukhmutalik6107
    @sumukhmutalik6107 4 года назад

    Thank you very much buddy

  • @suryaproabang280
    @suryaproabang280 Год назад

    thank you sir you super helpful

  • @qubeil
    @qubeil 6 месяцев назад

    Good jooooob... very helpfull brother...

  • @simplecraft5486
    @simplecraft5486 3 года назад

    Thank you so much....

  • @farhodrahimov3365
    @farhodrahimov3365 Год назад

    Thank you sir 🙏

  • @niklims5133
    @niklims5133 Год назад

    Thanks brother.

  • @saurabhkaka2445
    @saurabhkaka2445 Год назад

    Nice dear.. Thank you

  • @midhunv7306
    @midhunv7306 2 года назад

    Thank you😍😍

  • @lithuanianv9847
    @lithuanianv9847 3 года назад

    Legend

  • @cliffordhoper7403
    @cliffordhoper7403 5 лет назад +3

    This is a great help, however, using this to split multiple sheets of excel workbook to separate Excel files fails to carry through the merged cells from the original worksheet. A real problem if you have many worksheets to split.

  • @vedantsartcraftanddrawinga4804
    @vedantsartcraftanddrawinga4804 3 года назад

    Thanks

  • @TheJanus125
    @TheJanus125 Год назад

    Superrrrrrrrr

  • @AdnanKhan-jl8wh
    @AdnanKhan-jl8wh 5 лет назад

    I have 180 branches information in a single tab. Now I want to create 180 different excel files in a folder for an each branch. Could u help me out pls?

  • @anupriyasingh3708
    @anupriyasingh3708 4 года назад

    How you paste the VBA command ..please explain this

  • @nareshpatel1035
    @nareshpatel1035 5 лет назад

    VBA stopped working when Sheet names with space and special characters , could you please help

  • @joaocruz2082
    @joaocruz2082 3 года назад

    Thank you Sir , How to split Just per number of lines? 300 ,400 500 etc...

  • @swatijain27
    @swatijain27 3 года назад

    From where do I get that text file to cpy this vba

  • @charan0508
    @charan0508 11 месяцев назад +3

    Error in ws.copy

  • @suruthish2450
    @suruthish2450 Месяц назад

    I have some doubt ..whether VBA work with libre office instead of Excel

  • @jacky4sho
    @jacky4sho 3 года назад

    for some reason i lost formatting in all sheets and the names of each sheet is giberish. Any way I can fix?

  • @supermariochannel4182
    @supermariochannel4182 4 года назад +2

    Help : how. To get two sheet in one work book eg ; maths and science in one work book and send it to one teacher via mail. Please make a video on this channel please thank you so much
    2

  • @officialaccount6217
    @officialaccount6217 5 лет назад

    i cant split sheet that gebarated from pivot table?anybody has a solution?

  • @cristopherjoseph380
    @cristopherjoseph380 3 года назад

    Hi plz tell how to master xl with basics

  • @qasimbintahir3331
    @qasimbintahir3331 29 дней назад

    its not working on my laptop because i have brightness button on F11 button so what should i do?

  • @JONNEYBANSAL
    @JONNEYBANSAL 10 месяцев назад

    Hey I am not able to do it in Macbook, could you please tell me how I can do it its showing 1004 Error

  • @sudarshanbire1610
    @sudarshanbire1610 4 года назад

    HOW I WILL GET VISUAL BASIC APPLICATION (VBA)

  • @innovativetechsj2417
    @innovativetechsj2417 2 года назад

    Meri sheets un marged ho hai after useing this formula please help me out

  • @osamamohammedahmed9260
    @osamamohammedahmed9260 10 месяцев назад

    How can i get VBA file

  • @rohithjangam9994
    @rohithjangam9994 Год назад

    code should be copidable , here in description its not happening

  • @user-rv4pt9ri2u
    @user-rv4pt9ri2u 3 месяца назад

    where can I find VBA CODE?

  • @SabaKhattak-uc6oc
    @SabaKhattak-uc6oc 3 месяца назад

    Life saver,.... thank youuuuu

  • @sultanrony4826
    @sultanrony4826 4 года назад +2

    Dear, variable is not declare here for xWs. Need declare ...Dim xWs As Worksheet ..so correct code may..
    Sub Splitbook()
    'UpdatedbyTechtoday
    Dim xPath As String
    Dim xWs As Worksheet
    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

    • @user-oh6es2wb7n
      @user-oh6es2wb7n 6 месяцев назад

      Hi, it's still not working :( The macro name is blank

  • @Simranjitchawla
    @Simranjitchawla 2 месяца назад

    How to find code

  • @mbs8854
    @mbs8854 2 года назад

    Share the code

  • @ashoksabbani9182
    @ashoksabbani9182 10 месяцев назад

    Vba code plzz

  • @moosa137
    @moosa137 7 месяцев назад

    Ws

  • @novitaalfiani5142
    @novitaalfiani5142 3 года назад

    Please help, why not working on mac?

  • @bhagvatdake5796
    @bhagvatdake5796 2 года назад

    You are explaing is too fast. It should be slow.

  • @rekhapons3400
    @rekhapons3400 6 лет назад +2

    Help : how. To get two sheet in one work book eg ; maths and science in one work book and send it to one teacher via mail. Please make a video on this channel please thank you so much

  • @supermariochannel4182
    @supermariochannel4182 4 года назад

    Help : how. To get two sheet in one work book eg ; maths and science in one work book and send it to one teacher via mail. Please make a video on this channel please thank you so much
    2

  • @supermariochannel4182
    @supermariochannel4182 4 года назад

    Help : how. To get two sheet in one work book eg ; maths and science in one work book and send it to one teacher via mail. Please make a video on this channel please thank you so much
    2