ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF and or function (https://www.excelbanter.com/excel-worksheet-functions/126045-if-function.html)

EOB

IF and or function
 
I need a formaula that says:
If Cell B1 contains SA or A or D or SD then cell C2 reads 4 for SA or 3 for
A or 2 for D or 1 for SD. I hope that makes sense. I know how to do it for
yes and no but not when the cell could have four different entries.
Thank you

Teethless mama

IF and or function
 
=LOOKUP(B1,{"A","D","SA","SD"},{3,2,4,1})


"EOB" wrote:

I need a formaula that says:
If Cell B1 contains SA or A or D or SD then cell C2 reads 4 for SA or 3 for
A or 2 for D or 1 for SD. I hope that makes sense. I know how to do it for
yes and no but not when the cell could have four different entries.
Thank you


Roger Govier

IF and or function
 
Hi
Try entering in C2
=IF(B1="SA",4,IF(B1="A",3,IF(B1="D",2,IF(B1="SD",1 ,""))))

--
Regards

Roger Govier


"EOB" wrote in message
...
I need a formaula that says:
If Cell B1 contains SA or A or D or SD then cell C2 reads 4 for SA or
3 for
A or 2 for D or 1 for SD. I hope that makes sense. I know how to do it
for
yes and no but not when the cell could have four different entries.
Thank you




EOB

IF and or function
 
Thank you roger this was perfect.

"Roger Govier" wrote:

Hi
Try entering in C2
=IF(B1="SA",4,IF(B1="A",3,IF(B1="D",2,IF(B1="SD",1 ,""))))

--
Regards

Roger Govier


"EOB" wrote in message
...
I need a formaula that says:
If Cell B1 contains SA or A or D or SD then cell C2 reads 4 for SA or
3 for
A or 2 for D or 1 for SD. I hope that makes sense. I know how to do it
for
yes and no but not when the cell could have four different entries.
Thank you






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

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