Excel Crazy

Import Text Files into Excel through VBA

Import Text files through Excel VBA, There are two ways to import data from text file into MS Excel, Here we are using VBA code to import data. In Excel 2007 you can import or export up to 1,048,576 rows and 16,384 columns.


Suppose all your text files are saved in common folder of “D:” Drive. In the same folder your Summary Excel Workbook is also saved in which you want to import all your text file data. Text File name is passed in “Column B” of you worksheet and Result will be Collete in “Column D”.

OR you can save in any drive with common folder for text file and worksheet.

Step 1: Open your Excel VBA Editor (Alr+F11).

Step 2: Write down the below mentioned Code in the Module:

Step3: Run the Macro. (For reference check the attachment (Click Here)).

July 25, 2013

0 responses on "Import Text Files into Excel through VBA"

Leave a Message

Your email address will not be published. Required fields are marked *


© LOKESH PALIWAL 1987 - 2018


Reporting Solutions | Data Consulting | Analytics Training

close slider

Your Name (required)

Your Email (required)

Your Phone no. (required)

Your Message for us...

Skip to toolbar