Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tel Tel is offline
external usenet poster
 
Posts: 39
Default Three condition "if" statements

I'm trying to write an IF statement that needs to look at the input of three
cells (D4, D5 and D6).

If any of them are "YES" then I need cell E4 to = cell G1. However,
If they are all "no" then I need cell E4 to = cell G2

Finally, if they are all blank then I need cell e4 to be blank

Also, if I do this can I conditionally format cell E4 so if it = G1 then it
is White text on a red background, and if it = G2 then it is Black text on a
green background (I'm okay with CF just need to know if it's possible)

Looking forward to your replies.

TVM

Terry
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 506
Default Three condition "if" statements

Try this in E4 Cell

=IF(OR(D4="YES",D5="YES",D6="YES"),G1,IF(AND(D4="N O",D5="NO",D6="NO"),G2,IF(AND(D4="",D5="",D6="")," ","Value is not Matching the Criteria")))

If this post helps, Click Yes!

--------------------
(Ms-Exl-Learner)
--------------------



"Tel" wrote:

I'm trying to write an IF statement that needs to look at the input of three
cells (D4, D5 and D6).

If any of them are "YES" then I need cell E4 to = cell G1. However,
If they are all "no" then I need cell E4 to = cell G2

Finally, if they are all blank then I need cell e4 to be blank

Also, if I do this can I conditionally format cell E4 so if it = G1 then it
is White text on a red background, and if it = G2 then it is Black text on a
green background (I'm okay with CF just need to know if it's possible)

Looking forward to your replies.

TVM

Terry

  #3   Report Post  
Posted to microsoft.public.excel.misc
Tel Tel is offline
external usenet poster
 
Posts: 39
Default Three condition "if" statements

Many thanks for your reply, I've astounded myself by being able to work it
out, as follows:

=IF(AND(D4=G5,D5=G5,D6=G5),G11,IF(OR(D4=G4,D5=G4,D 6=G4),G2,""))

The CF was simple too, essentially Condition 1 Cell Value is - equal to -
=G1 (Set format)
Condition 2 Cell Value is - equal to - -G2 (Set format)

Probably basic to others but someone might find it useful.

Terry

"Ms-Exl-Learner" wrote:

Try this in E4 Cell

=IF(OR(D4="YES",D5="YES",D6="YES"),G1,IF(AND(D4="N O",D5="NO",D6="NO"),G2,IF(AND(D4="",D5="",D6="")," ","Value is not Matching the Criteria")))

If this post helps, Click Yes!

--------------------
(Ms-Exl-Learner)
--------------------



"Tel" wrote:

I'm trying to write an IF statement that needs to look at the input of three
cells (D4, D5 and D6).

If any of them are "YES" then I need cell E4 to = cell G1. However,
If they are all "no" then I need cell E4 to = cell G2

Finally, if they are all blank then I need cell e4 to be blank

Also, if I do this can I conditionally format cell E4 so if it = G1 then it
is White text on a red background, and if it = G2 then it is Black text on a
green background (I'm okay with CF just need to know if it's possible)

Looking forward to your replies.

TVM

Terry

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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Need more than 7 nested "IF" statements in Excel" James A Excel Discussion (Misc queries) 1 December 17th 06 02:02 AM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 08:56 AM.

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"