Automated Text Import in Excel with File Selection - The Easy Way - VBA

preview_player
Показать описание

200+ Video Tutorials - 200+ Downloadable Excel Reference Files - 50+ Hours of Content

How to import a text or csv file into Excel using an automated macro and vba - this is the easier, yet robust, way to import text using a macro, with user-selected files or hardcoded file names.

This tutorial teaches you how to import text using a macro with a file selection popup window that lets the user choose the file to import and also using a predefined file name so that you can quickly import the file without having to choose it from the computer.

All code in this tutorial is commented and fully explained and I take you step-by-step through the process of building the import macro and showing you how to change it to meet your needs.

This tutorial combines many VBA features, including:
- GetOpenFilename()
- OpenText
- IF Statements in VBA
- Copying values between workbooks in Excel.

Excel Courses:

#msexcel #howto #tutorial
Рекомендации по теме
Комментарии
Автор

Really helpful. The explanation is absolutely clear, have been a subscriber for a while now and glad I found your channel. Thanks.

philipboakes
Автор

Superb! Well documented and explained. Thank you

pj
Автор

Thanks so much for this excellent video. I create Excel systems for subscribers and usually I have them copy/paste input data. Now I can have them import directly from CSV/Text. What I want to know is how to append newly imported data to the first empty row (on the master) automatically. I imagine this might be a more advanced topic.

BUSINESSRESOURCES
Автор

A very informative and helpful tutorial ever, I'm truly thankful.

DuyenLe-ktxx
Автор

Thank you so much. Great explanation. This is my first time writing any sort of code and this helped me greatly with my task. Keep up the great work. 😊

vishptel_
Автор

Hello, i love this video! Very helpful. Is it possible for you to add one more to this coding? Add the CSV file name that was selected in any cell. So when anybody else is looking at the excel file, they know where the data came from.

jackiebanta
Автор

Very well explained. Thanks a lot
Current range selects only column A

kannanmassey
Автор

Great Tutorial!! Really Enjoyed The Explanation For The Cool VBA Code...Thank You Sir :)

darrylmorgan
Автор

Thanks mate, this really helped me heaps

mateomontoyanaranjo
Автор

great, simple, complete, to the point,

satishloke
Автор

Excellent Tutorial! Well put together and thorough. I do have a quick question. Is it possible to bring the data in without disrupting the formatting with Workbooks.OpenText? I've tried to figure out a way but and getting stuck. Thanks!

roor
Автор


200+ Video Tutorials - 200+ Downloadable Excel Reference Files - 50+ Hours of Content

TeachExcel
Автор

Thank you so much! No other words to say! =)

lucabottini
Автор

Unbelievable fantastic, supper, thank you .❤❤❤❤

harycan
Автор

Thank you so much.. Is it possible to import data to a specific row, e.g. no. 10?

robertkaniewski
Автор

I am learning a lot from you... but I still need to find a way to keep adding data (from more text files) to the same table... do you have a video about that?

juliopaniagua
Автор

Great work, respected sir. Please export code for txt paper, as well as import code from txt paper. Thank you

omarrahim
Автор

for forward slash (\) what we take ?? Delimiter

diwakarsingh
Автор

This is awesome, but the code will not allow me to select where the file comes from (location). when I run the code, it automatically pulls up all the files on my computer, not just the text files in the location I put in originally with the "fileToOpen = "location of text file.txt". Do you have any advice on that?

christopherlindsay
Автор

This is an amazing tutorial, though I’m having issues with the leading zeros in numerical data in the CSV file not appearing and then not importing through to the destination file. Any tips on how I can fix this in the VBA code at all?

jcgaming