Vlookup partial text from a single cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use a spread sheet which includes the customer address (city and state) in
a single (merged) cell. The spreadsheet also containes a look up table with
2-letter state abbreveations. I need to capture only the state from the
address (cell E5) for the vlookup.
=IF(VLOOKUP(E5,$GC$9:$GD$59,2,FALSE)=0,"NO",IF(VLOOKUP(E5,$GC$9:$GD$59,2,FALSE)>0,"Yes")) Excel 2003 SP1
 
Are you saying the you want to use "California" in the address cell to return
"CA"?

How are the City/State delimited in the address cell?
 
Are you saying the you want to use "California" in the address cell to return
"CA"?

How are the City/State delimited in the address cell?
 
If the state code is the last two letters in cell E5:

VLOOKUP(RIGHT(E5,2),$GC$9:$GD$59,2,FALSE)
 
If the state code is the last two letters in cell E5:

VLOOKUP(RIGHT(E5,2),$GC$9:$GD$59,2,FALSE)
 
Thank you Deb, this does exactly what I wanted.

Debra Dalgleish said:
If the state code is the last two letters in cell E5:

VLOOKUP(RIGHT(E5,2),$GC$9:$GD$59,2,FALSE)
 
Thank you Deb, this does exactly what I wanted.

Debra Dalgleish said:
If the state code is the last two letters in cell E5:

VLOOKUP(RIGHT(E5,2),$GC$9:$GD$59,2,FALSE)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top