Link to home
Start Free TrialLog in
Avatar of karthik80c
karthik80cFlag for United States of America

asked on

need to import a text file into a EXCEL using VBA.

I need to import a text file into excel using VBA.
The Excel file has the first row as the Column names. The text file values are separated by tab delimiter.
I would prefer a icon on the excel tab to run this macro. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of karthik80c

ASKER

Thank you Macro for a quick solution. The code is working. But the code is writing in the first row. I would like the first row to be left as I have to write a header information.
The first row should have Title, Color and Year.
Only from the second row the text file records should be imported.
Is there a possibility to remove the duplicates when importing the text file into excel file. Thanks.
Change row 19 to
RowNdx = ActiveCell.row + 1

Open in new window

Removing duplicates is a separate issue and should be asked in a separate question.