VLookup and change output

RJB78

Board Regular
Joined
Aug 8, 2016
Messages
69
Office Version
  1. 365
Hello. I have a vlookup function looking up American citys/towns and returning the full state name that they are located in. How can I pull in the full state's name (how the data comes in), but then have it display the abbreviated state's name. Example: Florida -> FL. LEN( doesn't always work.

I have a separate tab with the full states name in column A, and abbv. in column B

Thank you
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You can nest the vlookups like
=VLOOKUP(VLOOKUP(city,state,2,0),abbr,2,0)
 
Upvote 0
Solution
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

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