lookup macro

hyoung

New Member
Joined
Apr 22, 2002
Messages
2
new-ish excel user so apologies if answer is obvious!

I need to take a 140 column comma delimted file, import into Excel, assign new values to 30 of the columns based on a lookup (e.g. if column entry = Mr, replace with CG1254SFV), then export it again as a comma delimited file with "" marks around each value.

And I need to make this an automated procedure using a macro

Is this something I can do in Excel?

Any feedback greatly appreciated.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Haven't tried it myself but surely just import the file. Start recording a macro. Run text to columns. Input lookups. Save as file type .CSV (for comma delimited).

Does this work?

Jim
 
Upvote 0
Thanks Jimbo - think I gave too much info in the problem. Happy with the import, report macro and save as csv. Where I was coming from is the lookup side of things. The worksheet will have 140 columns, 40 of which will have values that I need to change, and each column might have 100+ different possibilities for the lookup, e.g. occupation. I have a table of occupation codes and I would need to change all the data in the column, e.g. mechanic becomes CVF1254DF etc. As I need to do this for 30 columns, I was looking for the best way of carrying this out?

Hope this is clear, fear it is not
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,213
Members
448,554
Latest member
Gleisner2

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