Це відео не доступне.
Перепрошуємо.

Excel macro to combine CSV files (Using Excel VBA)

Поділитися
Вставка
  • Опубліковано 3 лют 2021
  • In this Excel automation tutorial, I will show you how we can write a macro (using Excel VBA) to combine multiple CSV files.
    Imaging your boss asks you to combine 10 or 50 CSV files by the end of the day, and you only have couple hours left. If you are going to do this task manually, it will takes a few hours. However, if you can automate this task, then everything can be done in let's say 5 minutes.
    Source Code: learndataanalysis.org/excel-m...
    Buy Me a Coffee? Your support is much appreciated!
    ----------------------------------------------------------------------------------------------------------------
    PayPal Me: www.paypal.me/jiejenn/5
    Venmo: @Jie-Jenn
    📺 Also check out my 2nd channel Excel channel focus on sharing Excel tips: / @jjpowerbi
    Support my channel so I can continue making free contents
    ---------------------------------------------------------------------------------------------------------------
    Patreon: / jiejenn
    By shopping on Amazon → amzn.to/2JkGeMD
    More tutorial videos on my website → LearnDataAnalysis.org
    Business Inquiring: UA-cam@LearnDataAnalysis.org
    #ExcelVBA #MergeCSV #CombineCSV #ExcelAutomation

КОМЕНТАРІ • 12

  • @drujene
    @drujene 2 роки тому

    quiet simple, and useful...thx

  • @IcanCwhatUsay
    @IcanCwhatUsay Рік тому +2

    The line data_sheet.Range("A1").CurrentRegion.RemoveDuplicates 1, xlNo isn't working correctly for me. Instead of removing duplicates, it removes everything after the first CSV that was imported. Any Idea why?

    • @jiejenn
      @jiejenn  Рік тому +1

      It is hard to tell without looking at your table.

  • @tj4362
    @tj4362 2 роки тому

    Thanks Jie! I'm a beginner with Visual. My question is if I add additional CSV files to the folder, do I run the macro again to add the new CSV info? Will it duplicate the files I already merged into the Excel worksheet?

    • @jiejenn
      @jiejenn  2 роки тому

      The same files will get overwritten.

  • @markamadeus4580
    @markamadeus4580 2 роки тому

    Hi Jie, can you change the delimiter in VBA from , to ;?

  • @rachelhoams8776
    @rachelhoams8776 3 роки тому

    Hi Jie, how can you use this macro but also have it add a column with the name of each CSV file you combined?

    • @jiejenn
      @jiejenn  3 роки тому

      Depending on what you want to drink. Basically you will have to write additional VBA code to perform the additional things you want to perform.

  • @ochirgereltbyambasuren9676
    @ochirgereltbyambasuren9676 Рік тому

    Csv files not found comes out what should i do? Please help me

    • @jiejenn
      @jiejenn  Рік тому

      Makes sure the file path you provided is correct.

    • @ochirgereltbyambasuren9676
      @ochirgereltbyambasuren9676 Рік тому

      @@jiejenn Thanks it works. Is it possible to add code that change date format and replace the loss data to empty cell?

  • @namanjain3079
    @namanjain3079 2 роки тому +2

    Hey, why do i get Subscript out of range? Can you please help? on this
    Set data_sheet = ThisWorkbook.Worksheets("Master")