0

I have an Excel file where I have the 2-letter country codes in a column. I would like to be able to run a macro to safely convert all of them into their respective 3-letter codes, with a single pass.

When using normal find and replace in Excel, you can easily run into problems like this...

AT --> AUT

AU --> AUS

but now AUT --> AUST (which is not the result I wanted).

Community
  • 1
  • 1
gadgetic
  • 11
  • 5

1 Answers1

0

A simple VLOOKUP would seem easiest but if required often then maybe append a space to the end of the 2-letter codes then replace three characters for three characters. There could be problems if your column contains more than just 2-letter codes at present but you have given no hint that such is the case.

pnuts
  • 58,317
  • 11
  • 87
  • 139