#1   Report Post  
Posted to microsoft.public.excel.misc
Portuga
 
Posts: n/a
Default "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

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default "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
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default "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

  #4   Report Post  
Posted to microsoft.public.excel.misc
PipTT
 
Posts: n/a
Default "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

  #5   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default "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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help needed with "if" statement gina_b Excel Worksheet Functions 2 December 30th 05 04:24 PM
"If" statement using "And" Amanda Excel Discussion (Misc queries) 2 December 28th 05 03:02 PM
if then else statement also using "and" Amanda Excel Discussion (Misc queries) 2 November 9th 05 12:47 PM
The "IF" Statement JeremyH1982 Excel Worksheet Functions 1 October 18th 05 08:32 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"