Change number to city name

In the attached xl 2010 sheet, I have a list of names with offices represented by a number (entered as text in the sheet). I want to convert the numbers to the names of cities, so for instance where is has under the Office column 01, I would want  to change the 01 to be San Francisco, and 02 to be New York, etc.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anne TroyEast Coast ManagerCommented:
I don't think that's an Excel file. As a start, however, you might want to try VLOOKUP. Otherwise, I await an Excel file.
contrainAuthor Commented:
Sorry about that, I uploaded the wrong file. The correct one is now attached.
Anne TroyEast Coast ManagerCommented:
First thing you need is a list of numbers with corresponding cities.

Then, you need to let us know if you want a formula or a VBA macro that'll do it for you.

I have done the formula method... don't know how to do the macro method.

See the Lookups sheet for the reference.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
In addition, you can also create a List in excel, and then use Data Validation to link to the office source (check the worksheet "Lookups2" in NumberToCities (1).xlsx attached), so that user can select the office from a dropdown list instead of typing the Office Number. That could be a more user-friendly interface if this is the approach to be used.
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
Oppps, here's the attached doc.
contrainAuthor Commented:
Both answers were great, and gave me what I wanted, but this expert's answer involved fewer fields so it's one less choice for the user to make.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.