using vlookup for words w/different indentation

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

Guest

Hi,
I'm trying figure out a way to use a vlookup function when the word in the
table is the same but indented differently. For instance, you're looking for
the price of an 'apple' but the word 'apple' in the table is actually written
' apple' with 4 spaces in front of the word.

I was trying to use the 'Right' function but the number of letters my vary.
Thanks for your inputs.
 
This might suffice, where we append 4 spaces in front of the lookup value in
A1 to make it consistent with the table array's lookup col :

In say, B1: =VLOOKUP(" "&TRIM(A1),E:F,2,0)

Adapt to suit ..
 
looking for the *price* of an 'apple'

If the return value is numeric:

D1 = apple

=SUMIF(A1:A10,"*"&D1,B1:B10)

Biff
 

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