You are here:

Excel/Fill Conditional Cell


Totally new at this. I import customer address for mailing items which need to be formatted so that I can import into the Royal Mail website.
My question is that I need to do a lookup up on imported customer address list where the country name needs to be changed to their respected country codes ( ie United Kingdom = GB, Australia = AU)on the adjacent cell. Also the type of service used based on the cost of the item and weather its GB or overseas.
I have the full country codes, so does that mean I would have to individually VBA code it for each country and its code. Can you load a table of the country codes to lookup or dynamically.
To summarize
Country name to country code
Post Service if <10.00 then CRL ( normal Post)and is GB
         if >10.00 then TPS (tracked post)and is GB
or for Europe and the rest of the world
         if <10.00 then OLA ( normal Post)and is not GB
         if <10.00 then OLA ( normal Post)and is not GB

Thanks In Advance

As you hve the full list of codes, then to get the country name I would use a vlookup formula - I would PROBABLY do this by having one sheet for the imported data and one for the data to export, which contains formulas to take the data from the other tab OR perform the vlookup.

The service would then be a relatively simple series of IF statments


would I think do it - hope that this is clear but do let me know if I can help further - if it helps my direct email is
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Aidan Heritage


I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!


My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!

©2017 All rights reserved.