VLLOKUP AND SPACES

G

Guest

I have 2 worksheets in the same workbook where i'm trying to lookup store in
both. In sheet 1 the store is entered normal, in sheet 2 it is preceeded by
' spaces.
I tried using trim(sheet2!range)etc but get a #value! error. I messed
around with the match function trying to get this to work and could when I
used the value in sheet 2 1st, and I had to trim it. when I ran the formula
with sheet 1 1st, even with trim on sheet 2 I got the #value error.
I know I could trim the column in sheet 2 1st and then it would work, but I
can't mess with the format of someone elses worksheet.
Thoughts on how to make this work?
 
T

T. Valko

Try this:

Sheet1 A1 = lookup_value: store

Sheet2 some cell in column A = __store

=VLOOKUP("*"&A1,Sheet2!A1:B5,2,0)

Biff
 
G

Guest

Worked perfect. Thanks

T. Valko said:
Try this:

Sheet1 A1 = lookup_value: store

Sheet2 some cell in column A = __store

=VLOOKUP("*"&A1,Sheet2!A1:B5,2,0)

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

Top