ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Lookup (https://www.excelbanter.com/excel-discussion-misc-queries/14881-lookup.html)

nussbaum

Lookup
 
I have 3 options, cell A1 contains the words Staff,Contract, a range of other
texts or it may be blank
Can Lookup return values for each?
I have
= LOOKUP(A1,{"Staff","Contract"," ",""},{1,2,3,""})
but this is not returning the expected values...I suspect I do not
understand the necessary order required for this formula ....please advise
Thank you

Peo Sjoblom

You can't lookup a blank cell but you could use this

=IF(A1="","",VLOOKUP(A1,{"Staff",1;"Contract",2;" ","3"},2,0))


--

Regards,

Peo Sjoblom


"nussbaum" wrote in message
...
I have 3 options, cell A1 contains the words Staff,Contract, a range of

other
texts or it may be blank
Can Lookup return values for each?
I have
= LOOKUP(A1,{"Staff","Contract"," ",""},{1,2,3,""})
but this is not returning the expected values...I suspect I do not
understand the necessary order required for this formula ....please advise
Thank you





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

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