VBA Extracting Certain Things From Textfile Through Userform into Columns A B C

hoodielive

New Member
Joined
Apr 27, 2014
Messages
5
I have question for you. I am creating an automation tool in excel. I need to copy and paste a Local Unix/Linux text file into a textbox (userform). However, I want to automatically extract data that starts with a certain prefix and skip all the stuff that I can't use (which is stuff that does not have an ID, name and role). I want vba to find all matches to the anything that starts with pl, pa, fa, la etc. The reason I'm doing it that way is because I have to weed through thousands of rows of data on a daily basis and I only need certain things. I then want it to be insert into the columns. Can you show me how to do that? 

For instance the text report before it enters excel will be similiar to

tab delimited:
la54433 Johnny Popsickle sys sudoer adm
root adm sys bin (random stuff and then it will go to another ID)
I only need the IDs / Name / and Groups - the other stuff needs to stay out of the report --> in this case Column A - la54433 Column B - Johnny Popsickle Column C- sys sudoer adm

 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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