ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If ,AND, LOOKUP, Functions (https://www.excelbanter.com/excel-worksheet-functions/161065-if-lookup-functions.html)

Lot Doctor

If ,AND, LOOKUP, Functions
 
I would like to make a cell G37 come back with a number from checking IF
J37=1 and K2=1 Then LOOKUP FUNCTION But if J38=1 and K2=1 then LOOKUP
different function. If J37=1 and K2=2 then LOOKUP different function IF J38=1
and K2=2 then LOOKUP different function.

Even better yet I would like K2 to = N or E
I hope you can help thanks.





Roger Govier[_3_]

If ,AND, LOOKUP, Functions
 
Hi

Substituting N for 1 and E for 2 in your tests, can we assume that K2 will
either be N or E?
Can we also assume that J37 and J38 will never both be equal to 1 at the
same time?

If so, then
=IF(K2="","",
IF(AND(K2="N",J37=1),"lookup1",
IF(AND(K2="N",J38=1),"lookup2",
IF(AND(K2="E",J37=1),"lookup3","lookup4"))))

Substitute your lookup formulae in place of the 4 Lookups (excluding the
quotes)
--
Regards
Roger Govier



"Lot Doctor" <Lot wrote in message
...
I would like to make a cell G37 come back with a number from checking IF
J37=1 and K2=1 Then LOOKUP FUNCTION But if J38=1 and K2=1 then LOOKUP
different function. If J37=1 and K2=2 then LOOKUP different function IF
J38=1
and K2=2 then LOOKUP different function.

Even better yet I would like K2 to = N or E
I hope you can help thanks.








All times are GMT +1. The time now is 07:10 AM.

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