ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   VLLOKUP AND SPACES (https://www.excelbanter.com/excel-worksheet-functions/137027-vllokup-spaces.html)

toolman

VLLOKUP AND SPACES
 
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. Valko

VLLOKUP AND SPACES
 
Try this:

Sheet1 A1 = lookup_value: store

Sheet2 some cell in column A = __store

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

Biff

"toolman" wrote in message
...
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?




toolman

VLLOKUP AND SPACES
 
Worked perfect. Thanks

"T. Valko" wrote:

Try this:

Sheet1 A1 = lookup_value: store

Sheet2 some cell in column A = __store

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

Biff

"toolman" wrote in message
...
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. Valko

VLLOKUP AND SPACES
 
You're welcome. Thanks for the feedback!

Biff

"toolman" wrote in message
...
Worked perfect. Thanks

"T. Valko" wrote:

Try this:

Sheet1 A1 = lookup_value: store

Sheet2 some cell in column A = __store

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

Biff

"toolman" wrote in message
...
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?








All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com