Look through Values In Column, Write Related Value In Next Cell

Killswitch

New Member
Joined
Jul 30, 2011
Messages
2
Hi all, long time reader, first time poster. I've got problem that has me stumped, and would be hugely appreciative of any advice. I use Excel 2003 and Windows XP. The problem is as follows...

I receive data, containing addresses (Up to 100,000 in some cases). Each country needs to be assigned a code, this is done for sorting purposes (USA - NA1, for example). So I want a macro that will loop through the selection (country column) and write the relevant code in the next cell in the row (sort code column)

I could do this via v-look up, without need for VBA, but the data comes in from different sources, so the data is inconsistent, either alternative country names or old-fashioned spelling mistakes.

Getting around the inconsistencies is the next step, but first I need to get the first step working. Is what I'm trying to do possible?

I'd be massively thankful for any advice.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

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