A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

vlookup removing characters



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2009, 07:22 PM posted to microsoft.public.excel.worksheet.functions
Ryan
external usenet poster
 
Posts: 551
Default vlookup removing characters

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!
  #2  
Old April 21st, 2009, 07:32 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default vlookup removing characters

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



"ryan" wrote:

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!

  #3  
Old April 21st, 2009, 08:28 PM posted to microsoft.public.excel.worksheet.functions
Ryan
external usenet poster
 
Posts: 551
Default vlookup removing characters

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

thank you much!!

"Mike H" wrote:

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



"ryan" wrote:

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!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.