VBA: Split data into Separate Workbooks

Поделиться
HTML-код
  • Опубликовано: 13 июл 2018
  • Hello Friends,
    In this video you will learn how we can split our data into multiple workbooks. Every workbook will be saved in the given folder path. This macro can be used when you have a long list of your data and you have to make different files with specific data. Here in this example we have taken Employee wise performance data and we have to split our data for each supervisor.
    Download the excel file from below given link:
    www.pk-anexcelexpert.com/vba-...
    Visit to learn more:
    Chart and Visualizations: www.pk-anexcelexpert.com/cate...
    VBA Course: www.pk-anexcelexpert.com/vba/
    Download useful Templates: www.pk-anexcelexpert.com/cate...
    Dashboards: www.pk-anexcelexpert.com/exce...
    Watch the best info-graphics and dynamic charts from below link:
    • Dynamic Graphs
    Learn and free download best excel Dashboard template:
    • Excel Dashboards
    Learn Step by Step VBA:
    • VBA Tutorial
    Website:
    www.PK-AnExcelExpert.com
    Facebook:
    / pkan-excel-expert-9748...
    Telegram:
    t.me/joinchat/AAAAAE2OnviiEk5...
    Twitter:
    / priyendra_kumar
    Pinterest:
    / pkanexcelexpert
    Send me your queries on telegram:
    @PKanExcelExpert

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

  • @Johnck90
    @Johnck90 23 дня назад +1

    You have literally just saved me a heap of work, and reduced any chance of error! Absolutely amazing!! Thank you

  • @TheMissSELane
    @TheMissSELane 3 года назад +8

    Hi All
    Here’s how to Auto Fit column width:
    Where he has typed “ColumnWidth = 15”, replace it with “AutoFit” ☺️ it just worked for me.

  • @alandouglas2789
    @alandouglas2789 2 месяца назад +1

    What an amazingly helpful video. Short code, easy to see how it works

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

    This was exactly what i needed. i spent hours sleuthing the microsoft support pages before stumbling across this video. thank you thank you thank you!!!!

  • @bcnicholas123
    @bcnicholas123 5 лет назад +13

    You just saved me a week of work with a single click. Thanks

  • @JordanJens009
    @JordanJens009 4 года назад +3

    Excellent work and thank you for such a clear line by line explanation!

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

    Amazing video, I expected this task to take me a few hours but thanks to you it took 45 minutes. Thanks so much!

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

    I cant thank you enough, my work asked me to do this, I was clueless on how to go about it, u just saved me

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

    Honestly i don't know which one of your videos is the best every time i watch any of you videos including Power Bi I said to myself "no way this one is the best". In conclusion Thank you for what you are doing you are definitely the best!

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

    I updated vba code based on my requirements and achieved goal successfully with your support. Thanks PK for your support.

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

    I love you! thanks. It costed me hours to understand. First time in my life using Visual, but it was worth it

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

    अति सुन्दर , P K Sir, मज़ा आ गया आपके VBA Code से , एक दम Magic... So Nice Sir.......

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

    I came for help and I found glory haha. Thank you so much, my friend!!!

  • @suki9860
    @suki9860 2 года назад +1

    Absolutely excellent and perfect solution. Thank you very much, PK! !

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

    Excellent. You saved my life in this lockdown

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

    You saved a lot of my time. Very well explained. Thank You

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

    Excellent. Worked without any issues. Thank you very much

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

    Dear Friend,
    Thanks for sharing this. You are saving tons of time for people

  • @DavidGomez-le7if
    @DavidGomez-le7if 11 месяцев назад

    This is life saver, I might need to use this for several hundreds of worksheets.

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

    Thank you so much for the short yet helpful video, I did it :)

  • @aaravrajvlog111
    @aaravrajvlog111 Год назад +1

    You really are "THE EXPERT". HANDS DOWN!

  • @franciscogarcia7280
    @franciscogarcia7280 2 года назад +1

    Great video. It is just what I was looking for to automate some data processing. Thank you for sharing your knowledge.

  • @CB-xk6ce
    @CB-xk6ce 4 года назад +4

    You rock man, saved me 3 days of work. Thanks!

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

      Glad I could help!

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

      Hi. Getting this errors

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

      Run time error 13 type mismatch on
      Set nsh=nwb.sheets line.
      Could you please help

  • @balrajvirdee1087
    @balrajvirdee1087 Год назад +1

    Thanks so much for sharing this, life saver!!!

  • @AmanUllah-yx5kg
    @AmanUllah-yx5kg Год назад

    Thank you bro I have split data into 237 separate files by this amazing technique.

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

    Thank you so much Mr.PK for your useful sharing.

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

    Thank you so much for the short yet helpful video, its save more time

  • @joshuafields8685
    @joshuafields8685 2 года назад +2

    Just an outstanding tutorial! Exactly what I needed.

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

    Great Job! thank you for sharing it!

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

    This was the output I was searching from a long time. Thanks @PK: An Excel Expert
    Also, I was willing to know that How the same output can be obtained using Advanced Filter instead of an AutiFilter ?
    Using an Advanced Filter will save a good amount of loading time of copy & paste. Your support is Valuable. Thanks

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

    Thanks alot for sharing woderful tutorials really It's a very useful have saved 3 hars in a day.....

  • @Ham_1982
    @Ham_1982 5 лет назад +1

    thank you for the tutorial, helped me a lot!

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

    Amazing 😊 it worked so well. Thank you so very much!

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

    I watched other videos but yours worked, thanks!

  • @info2satish
    @info2satish 6 лет назад

    Good stuff PK!👍

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

    Thankyu so much sir for these kind of Tutorials... I really liked your work

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

    Search finished at this point sir
    Thanks a lot

  • @Almirjorge1
    @Almirjorge1 6 лет назад

    Show!!!
    Thanks for sharing.

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

    Thank you @PK. Great video.

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

    Absolute brilliant work

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

    thank you very much.....very nicely explained......!!!!

  • @vamshibandapally
    @vamshibandapally 6 лет назад +1

    Great workbook. Very useful. Thank you

  • @trevormeisel
    @trevormeisel 5 лет назад +1

    Excellent piece of work - thanks

  • @amreshpatil6214
    @amreshpatil6214 5 лет назад +1

    Thanks pk this video was reduce by time to work. Once again thanks

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

    very good explanation . i thank pk for outstanding and commendable work in excel.

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

    Wahooo!! Great!! Thank you very much !!! It's done

  • @bharathipuduru3684
    @bharathipuduru3684 Год назад +1

    Hi, It is very helpful for my reports, thanks a lot for providing such a great tool, it is saving my lot of time.

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

    muchas gracias muy buen aporte

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

    This worked perfectly! Huge time saver! Does anyone know if/How I can add a summation to a column after each workbook is created?

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

    THAT WAS VERY USEFULL THANKS ENDLESSLY

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

    Thank you, this helped tremendously, was able to change a few things to what was needed. Question: When saving the individual files you have set it to Supervisor-1 and so on, what if I need to save each file with added text to "Supervisor-1" such as "XXXX-XXX-Supervisor-1"?

  • @joannasteinweiner7246
    @joannasteinweiner7246 3 года назад +3

    Thank you for the video - would you mind answering a few questions? If I have multiple header rows I want to maintain how do I need to amend the code and is there a way to maintain formulas in the new worksheets? Thanks again

  • @_Deepak2208
    @_Deepak2208 5 лет назад +2

    Thanks thanks thanks & thats a ton 😊 it's really useful ..👌

  • @archanalenka9474
    @archanalenka9474 Год назад +1

    A gem! Thanks

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

    Very informative and helpful

  • @mohamedaboobackersiddique7322
    @mohamedaboobackersiddique7322 5 лет назад +1

    thanks for your simple steps

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

    @PKanExcelExpert Thank you so much for this! One of my columns has a dropdown list with values to be selected and the dropdown options are disappearing in the new files created. Is there a way to keep them? Thanks!

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

    Very Helpful. Thank you so much

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

    Really good stuff!

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

    Thanks for sharing.

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

    Thank you very much !

  • @anooruproy3670
    @anooruproy3670 5 лет назад +1

    Thanks it was very helpful.

  • @nazermelethil
    @nazermelethil Год назад +1

    Thanks PK!

  • @user-nm4ul6gr6o
    @user-nm4ul6gr6o 3 месяца назад +1

    Thank you so much, Sir.

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

    Finally, the code that works without any hassle!

  • @sub1994hash
    @sub1994hash 5 лет назад +1

    Thanks man, got my job done.

    • @PKAnExcelExpert
      @PKAnExcelExpert  5 лет назад +1

      Thanks for your valuable feedback

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

      @@PKAnExcelExpert can u tell what the code should be if i want to run the macro on the same active worksheet. The code should run on the current worksheet without asking the name of worksheet.

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

      You can use "Activesheet" key word. For example Activesheet.range("A1:A10").Select

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

    in this tool required above 255 character drop down from another sheet
    Tool is good and useful

  • @ORANGEPICTURESOFFICIAL
    @ORANGEPICTURESOFFICIAL 6 лет назад

    Nice video sir.....very useful video. Thank you

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

    always great PK

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

    Thank you PK, however i have a question, what if you want to use two supervisors in one work book. lets say Supervisor-1 and Supervisor-4 combine in one work book and the rest can be separated. how would you do that? Please help, i am working on a project and i have multiple data that i want in one work book. Thank you

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

    Thanks! How can you keep the sheet name (Data) the same when the new workbooks are created ?

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

    Great. It works cool. Big help. Thanks

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

      Thanks for your valuable feedback

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

      Only need to know one thing please. If I need to save the files with extn .xlsb what do I do please?

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

    Superb Representation and it's working well.. I saved 6 hours of time for every month.. Along with this can you please explain how to protect all these file with password using VBA?

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

    An excellent tutorial of VBA for a very commonly used Excel job. This will cut short the time by many minutes / hours as per the data size.,👍👍👍👍👍. Thanks for that.
    I have one question, Will the "Remove Duplicate" command work on unsorted data in "Setting" sheet? Since your data was pre-sorted, the command worked well. If the command does not work on unsorted data, a sort command, before the "Remove Duplicate" may be necessary. Please mention that command syntax since I am not conversant with VBA.
    Thanks again.

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

    thanks for sharing! another question, how to split into multiple workbook based on row count?

  • @archie_2609
    @archie_2609 Год назад +1

    very helpful video, really useful

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

    Thank you for the Tutorial, I have Question please How can insert Value in cell A5 for example in multi open workbooks not worksheets ,
    every cell in multi open workbooks in the same name of worksheets

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

    Do you have any tips on how to maintain the a header or footer in the split files. In addition to this I am trying to add a signature box at the end of every file, footer of the last page? Appreciate the help.

  • @buddhathakuri
    @buddhathakuri 5 лет назад +1

    Wonderful great work

  • @arindambiswas1463
    @arindambiswas1463 2 года назад +1

    Very helpful... Thanks 🙏

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

    superb

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

    Would it be possible to add to the macro instructions to email the individual .xlsx files to specified email addresses?

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

    Awesome!

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

    Great video. However, does anyone know how to choose the columns that will be loaded in the new workbook (ex. columns A to K) and not have the header included?

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

    hi
    i spent over 65 hours trying to split a worksheet master into worksheets filtered by column B, AND workbooks at the same time
    1- to be updatable every time macro is run, delete old info and rewrite
    2- to divide each workbook filtered by column E

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

    Hello PK, finally I have found the explanation that I have been looking for, for so long. And it works like a charm. I have even made a number of additions such as Freeze Top Row & Autofilter, but what I can't do is that Excel takes the column width 'exactly' as in the original file. Autofit comes close, but it just isn't. Do you have a solution for this? Then I really would have the perfect excel file and this saves me days of work. Thank you very much in advance.

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

      Yes that is exactly what I need too, keep the column width as per original file 😅. If it isn't too much trouble, might you please explain how you managed to include Freeze Pains & Autofilter? ☺

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

    Thank you, Shouldn't we set screen updating to TRUE at the end of the code?

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

    Been using your code and it's working perfect! is it possible to have the header as two row instead of one? what code should i use for that? many thanks!

  • @craigvoss1468
    @craigvoss1468 6 лет назад +1

    Great job

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

    Hello, I have tried the code that you have shown in the video. However when I tried to open the individual file, there is no data in it. Please help. Thanks!

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

    Thanks sir.

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

    is there a way to separate into worksheets and not workbooks? basically I want a tab for each supervisor instead of a different file.
    In the case of separating to another workbook is there a way to select only 1 supervisor to export? instead of exporting all of them when running the macro.

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

    You are a hero

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

    I have a requirement to create .csv excel files for each row in an excel sheet. Any suggestions?

  • @avikvideosandshorts
    @avikvideosandshorts 9 месяцев назад

    This is very helpful
    One query: how to add sensitivity label while saving the newly created file.

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

    Super best!!!

  • @ajaykushwaha-je6mw
    @ajaykushwaha-je6mw Год назад +1

    You are genius!

  • @raliyev
    @raliyev 5 лет назад +1

    Thank you for sharing. Could you please advise how to automatically clear the filter on data page after an imlementation.

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

    Hi, PK, I have used macro and it is working fine but issue is that when new workbook create, it lose the Formulas which are given in master sheet. Can you help me to create new workbook with formulas?

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

    Hey do you know why the 4th row : set data_sh = Thisworkbook.Sheets(“Data”) its say its wrong