ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   "IF" "AND" Statement (https://www.excelbanter.com/excel-discussion-misc-queries/68464-if-statement.html)

Portuga

"IF" "AND" Statement
 

Hi

In Cell A1 I have Possible Values from 1 to 6.
I want to have the following conditions in B1:

If a1=1 then "R",
If a1=2 then "S",
If a12 then "Yes"

Thanks!


--
Portuga
------------------------------------------------------------------------
Portuga's Profile: http://www.excelforum.com/member.php...fo&userid=6385
View this thread: http://www.excelforum.com/showthread...hreadid=506815


PipTT

"IF" "AND" Statement
 

You can use a nested IF formula in B1:

=IF(A1=1,"R",IF(A1=2,"S",IF(A12,"Yes","")))

or

=IF(A1=1,"R",IF(A1=2,"S","Yes"))

Not sure how AND comes into it.


--
PipTT
------------------------------------------------------------------------
PipTT's Profile: http://www.excelforum.com/member.php...o&userid=30989
View this thread: http://www.excelforum.com/showthread...hreadid=506815


Dave Peterson

"IF" "AND" Statement
 
=if(a1=1,"R",if(a1=2,"S","Yes"))

If you know you have 1-6 in A1.



Portuga wrote:

Hi

In Cell A1 I have Possible Values from 1 to 6.
I want to have the following conditions in B1:

If a1=1 then "R",
If a1=2 then "S",
If a12 then "Yes"

Thanks!

--
Portuga
------------------------------------------------------------------------
Portuga's Profile: http://www.excelforum.com/member.php...fo&userid=6385
View this thread: http://www.excelforum.com/showthread...hreadid=506815


--

Dave Peterson

Ron Coderre

"IF" "AND" Statement
 

How about something like this:

B1: =CHOOSE(MIN(+A1+1,4),"","r","s","yes")

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=506815


CLR

"IF" "AND" Statement
 
Put this formula in B1..........

=IF(A1=1,"R",IF(A1=2,"S",IF(A12,"Yes","")))

Vaya con Dios,
Chuck, CABG3



"Portuga" wrote:


Hi

In Cell A1 I have Possible Values from 1 to 6.
I want to have the following conditions in B1:

If a1=1 then "R",
If a1=2 then "S",
If a12 then "Yes"

Thanks!


--
Portuga
------------------------------------------------------------------------
Portuga's Profile: http://www.excelforum.com/member.php...fo&userid=6385
View this thread: http://www.excelforum.com/showthread...hreadid=506815




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

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