Conditional formatting formula for cell

Alpacino

Well-known Member
Joined
Mar 16, 2011
Messages
511
Hi all. Wonder if anyone can help.

How do you put this formula into a conditional formatting formula based on if the answer is “Pass” the cell is green, “Inter” the cell is yellow and fail it’s red.

PASS =IF(SUM(D3:$H3)<=$C3
INTER =IF(AND(SUM(D3:$H3)>$C3,SUM(E3:$H3)<$C3)
FAIL = any other value is fail

many thanks

Al
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Put this into A3:

Code:
=IF(SUM(D3:$H3)<=$C3,"PASS",IF(AND(SUM(D3:$H3)>$C3,SUM(E3:$H3)<$C3),"INTER","FAIL"))

And make the conditional for A3 be 3 conditions:

="PASS"=A3 (then set background to green)
="INTER"=A3 (set to yellow)
="FAIL"=A3 (set to red)
 
Upvote 0
How do you put this formula into a conditional formatting formula based on if the answer is “Pass” the cell is green, “Inter” the cell is yellow and fail it’s red.
What cell or cells are you trying to colour?
Could you give a small set of sample data and explain your requirement in relation to that sample data?
 
Upvote 0
Thanks for replying

https://www.dropbox.com/s/gbc9lkfd6memmyx/IMG_5177.jpg?dl=0

Ill try to explain. Basically the story is.... there is a school trip and only certain number of pupils based on if they scored highest. If however there are too many that have the same score they will have to be Interviewed “INTER” e.g. Maths there are 8 places, there are currently 14 pupils in class. 4 pupils scored 4, passed, 2 pupils scored 4, passed but 4 pupils scored 3, so that group is “INTER” and the rest fail.

hope that explains it.

Thank you
 
Last edited:
Upvote 0
hope that explains it.
I think so. For this sample select D3:H5 and enter the CF rules (formulas) as shown. Make sure your rules end up in this order when you go in to Conditional formatting -> Manage Rules ... (you can select and move the rules up/down in there if required)


Excel Workbook
CDEFGH
3601242
4804424
5610353
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D31. / Formula is =SUM(D3:$H3)<=$C3Abc
D32. / Formula is =AND(SUM(D3:$H3)>$C3,SUM(E3:$H3)<$C3)Abc
D33. / Formula is =D3<>0Abc
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,428
Members
448,896
Latest member
MadMarty

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