vlookup removing characters

  • Thread starter Thread starter ryan
  • Start date Start date
R

ryan

I'm trying to lookup a value where my lookup_values contain extra text.

e.g.

lookup_values = "Los Angeles, CA TOTAL

the table array will have Los Angeles, CA but not the word "TOTAL"

so, i'm lost somewhere at the beginning of the function. I know that i need
to remove the last six characters from my lookup_value, i'm not sure how.

please help.

thanks!
 
Ryan.

Use the TRUE switch

=VLOOKUP("Los Angeles, CA TOTAL",$A$1:$B$17,2,TRUE)

or if your lookup value is in a cell (say) c1

=VLOOKUP(LEFT(C1,LEN(C1)-6),$A$1:$B$17,2,FALSE)

Mike
 
perfect!! I get scared of the TRUE switch, so I tend to avoid it, but the
second option works great.

thank you much!!
 
Back
Top