Using =IF(AND( or the IFS functions as a formula within Conditional Formatting (CF)

Walkon

New Member
Joined
Dec 13, 2021
Messages
33
Office Version
  1. 365
Platform
  1. Windows
I am trying to highlight the entire row of a table if three conditions are met. That is, if the word "Yes" appears in cells E5, F5, and G5, then I want to format that row. I tried using:
=IF(AND($E5="Yes",$F5="Yes",$G5="Yes")) - Excel doesn't appear recognize this as a formula within CF
=IFS($E5="Yes",$F5="Yes",$G5="Yes") - Excel says there are not enough arguments in this formula
=$E5=IFS($E5="Yes",$F5="Yes",$G5="Yes") - is not recognized as a formula
=$E5="Yes" - highlights the row but I only want to highlight it if all three conditions are met

Any assistance will be greatly appreciated.

Thanks
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try

Excel Formula:
=AND($E5="Yes",$F5="Yes",$G5="Yes")
 
Upvote 0
Try

Excel Formula:
=AND($E5="Yes",$F5="Yes",$G5="Yes")
Thank-you for this. I just tried it and no luck. Below is a picture of the response from excel.

1734478979431.png
 
Upvote 0
I just tried it and no luck.
You have changed the formula suggested. In it you have a "." where it should be a ","

Another form of the formula you could use would be
Excel Formula:
=COUNTIF($E5:$G5,"Yes")=3
 
Last edited:
Upvote 0
Solution
You have changed the formula suggested. In it you have a "." where it should be a ","

Another form of the formula you could use would be
Excel Formula:
=COUNTIF($E5:$G5,"Yes")=3
Thanks for the quick reply! I corrected my error of using a period instead of a comma in the =AND( formula but got the same response. However, when I tried the COUNTIF( suggestion it worked perfectly! Thanks very much.
 
Upvote 0
I corrected my error of using a period instead of a comma in the =AND( formula but got the same response.
Then to be honest I think that you must have made some other error with it as the post #2 formula works fine for me.

24 12 18.xlsm
ABCDEFGHI
5YesNoYes
6YesYesYes
7NoNoNo
8YesYes
9
10YesYesYes
YesYesYes
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A5:I10Expression=AND($E5="Yes",$F5="Yes",$G5="Yes")textNO


Anyway, I guess the main thing is that you have something that works. :)
 
Upvote 0

Forum statistics

Threads
1,225,626
Messages
6,186,087
Members
453,336
Latest member
Excelnoob223

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top