ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup Question (https://www.excelbanter.com/excel-worksheet-functions/89128-lookup-question.html)

Barb Reinhardt

Lookup Question
 
I am trying to set up the formula for lookup using the assist where I can
fill in the function arguments:

In lookup value, I enter B2 and the correct value is displayed.
In lookup vector, I enter something like "A","B" - the value displayed is
INVALID
In the result vector, I want 1 to display if A is matched and 2 to display
if B is matched. I have entered 1,2 and it shows as "1,2"

What am I doing wrong here?

Thanks,
Barb Reinhardt





Bob Phillips

Lookup Question
 
=LOOKUP(B2,{"A","B"},{1,2})

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Barb Reinhardt" wrote in message
...
I am trying to set up the formula for lookup using the assist where I can
fill in the function arguments:

In lookup value, I enter B2 and the correct value is displayed.
In lookup vector, I enter something like "A","B" - the value displayed is
INVALID
In the result vector, I want 1 to display if A is matched and 2 to display
if B is matched. I have entered 1,2 and it shows as "1,2"

What am I doing wrong here?

Thanks,
Barb Reinhardt








All times are GMT +1. The time now is 03:22 PM.

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