Automating Importing Multiple CSV Text Files - VBA Excel 2010

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • VBA Excel 2010 - Automating Importing CSV Text Files - Importing Multiple CSV Tab Delimited Text Files using VBA and deleting a Workbook Connection
    Handy Excel Resources
    amzn.to/3gFx7s1 - Excel Formulas & Functions For Dummies 5th Edition
    amzn.to/3sYnuH6 - Microsoft Excel 2019 VBA and Macros
    amzn.to/2PqXhU0 - MICROSOFT EXCEL VBA AND MACROS FOR BEGINNERS:
    amzn.to/3xtsLtM - Microsoft Excel VBA Programming for the Absolute Beginner
    amzn.to/3xwkEg0 - Excel 2019 Bible
    amzn.to/3aJEHxW - EXCEL 2020 FOR BEGINNERS
    As an Amazon Associate, I earn from qualifying purchases. Product prices and availability are subject to change.

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

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

    How to extract text or specific text only from notepad to Excel using VBA

  • @christopheraustin3815
    @christopheraustin3815 8 лет назад +4

    I also get an error on:
    " .Refresh BackgroundQuery:=False"
    It shows Runtime Error 1004
    Can you help me with this?

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

    thank you so much Alex for this video very explicit with Cristal clear steps ... found it very useful to import data from multiple CSV files ..will tweak it a bit by making a single data file with no repeated headers or ampty rows

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

    Love your very concise and straight to the point Video on this very popular topic Alex. Thanks mate.

  • @tarahaarlander4072
    @tarahaarlander4072 7 лет назад +1

    This is a great tutorial, thanks so much! Question...if I wanted to vary the reps (as in, I will be importing a variable number of .csv files each time I use the macro) how would I set the variable?

  • @DondaEsWaldo
    @DondaEsWaldo 8 лет назад +1

    Thank you so much!
    What do I do if I want my second data to be imported into a specific column?

  • @zumajulian
    @zumajulian 7 лет назад +2

    Can i copy this code somewhere ??

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

    Ill try running this but i got this error message, compiler error: invalid Next control variable reference, would be glad if you can help me sort this out. thanks!

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

    Very nice and comprehensive video. Thanks. If I import the csv once again, (with the previous data left there) it'll start to import from the first empty leftmost column. What if I wanted just overwrite the same area. Why it doesn't use $A$1 as first cell..?

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

      FInally - got it. Just use RefreshStyle = xlOverwriteCells property indtead of .RefreshStyle = xlInsertDeleteCells

  • @bombay24
    @bombay24 8 лет назад +1

    HI Alex. Is there a way to create a validation check to ensure that all of the data from each file is being transferred? I've searched everywhere and haven't been able to find anything re importing .txt files. Thanks, your videos are awesome!

  • @mouleong88
    @mouleong88 8 лет назад

    Thanks for your great video.. Can you please show how to paste the outputs of each subsequent csv file in the different columns? mean output row to output column. Thanks.

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

    Since thanks ! Wonderful tutorial. A quick demo followed by steps to achieve .. nicely presented. BR

  • @chrisgast
    @chrisgast 8 лет назад

    Is it possible to change the commas in columns F through H into semi-colons?

  • @excelfan85
    @excelfan85 9 лет назад +1

    Awesome :) great work thanks for adding the the idea of the connections code its something i hadn't thought of.

  • @rastasmile
    @rastasmile 9 лет назад

    This saved us a lot of time. Thank you!!

  • @elizabethbeck9469
    @elizabethbeck9469 7 лет назад

    I get an error on:
    " .Refresh BackgroundQuery:=False"
    It shows Runtime Error 1004
    I appreciate any help you can give.Thanks!

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

    How can I get the codes?

  • @winmaxservices
    @winmaxservices 9 лет назад

    Is there a way to import the files in new worksheet. means 1 file in one new existing worksheet

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

    I have the same problem with "Subscript out of range"

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

    Ok but you could have provided code's text in comments.

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

    Using this procedure system fail reporting out of memory, solved using open files and copy paste

  • @marthanieto5110
    @marthanieto5110 9 лет назад

    Hi Alex, Thanks for this video. Very helpful.

  • @markdaniel29
    @markdaniel29 8 лет назад

    Hi Sir,
    I get an error on:
    " .Refresh BackgroundQuery:=False"
    It shows Runtime Error 1004
    Can you help me with this?
    Thanks a lot!

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

    brilliant 10/10

  • @1962wardog
    @1962wardog 5 лет назад

    Code runs with no errors but, is not deleting the connections for the file! Any ideas!!

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

      Dim My_Query As WorkbookQuery
      For Each My_Query In ActiveWorkbook.Queries
      If InStr(failsGAN, My_Query.Name) > 0 Then
      My_Query.Delete
      End If
      Next My_Query

  • @kevinhess2447
    @kevinhess2447 9 лет назад

    Is there a way to have it import each subsequent csv file into the next open row?

    • @donmac1963
      @donmac1963 9 лет назад

      Kevin Hess Yes. You will need to change the row_number variable to be the following (assumimg that you are entering data into column A (1)):
      row_number = Worksheets("sheetname').Cells(Rows.Count, 1).End(xlUp).Row + 1
      Where sheetname is the name of the sheet that you are entering data onto.

  • @SannareddyHarshavardhan547
    @SannareddyHarshavardhan547 8 лет назад

    Thanks a lot !!

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

    Good stuff