İmport txt files in excel with VBA codes

sy43fb

New Member
Joined
Jan 18, 2020
Messages
19
Office Version
  1. 2016
Platform
  1. Windows
I wanna import txt files in excel with VBA. I want to import text one by one column.
İf in text file
abcd 123 x+-
32 7 k 698755 then import like below
A B C D E F G H I J K L M N
1 a b c d 1 2 3 x + -
2 3 2 7 k 6 9 8 7 6 5 5

I need to codes. Can anybody help me?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
How can I learn VBA. Can you suggest to me Book and VBA tutorial?
 
Upvote 0
For a beginner, pretty much any VBA book will be helpful though I'm sure some would recommend various books over others. Most books, in an attempt to grab the largest audience, seem to only take you so far. Frankly, I find that going through the table of contents in the Visual Basic Reference methodically and taking the time to understand what tools are available has helped me the most. Also, looking at other's code and helping others out on message boards such as this one will expose you to a variety of real world problems. But most important, be creative and have fun! :)
 
Upvote 0
Thanks for your suggestions. I think the most important thing beginning:)
 
Upvote 0

Forum statistics

Threads
1,215,741
Messages
6,126,610
Members
449,321
Latest member
syzer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top