vlookup removing characters

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!
 
M

Mike H

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
 
R

ryan

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

thank you much!!
 

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

Top