Change Cell Colour Based On Range of Cells

David102938

New Member
Joined
Nov 26, 2018
Messages
7
So I have a range of cells for a worksheet (C5:Q5 to be precise) and I want cell BY to turn red if all of those cells are blank, I know I can use Conditional Formatting to do this but I'm not sure what formula to use. Would I be able to do it for one row and then quickly do it for other rows? Or would I need to redo the process for each row, and would I be able to add in extra columns between C5 and Q5 and keep the rule?

Any help is much appreciated!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
-click on BY5
-home tab/conditional formatting
-New rule
-last line "Use a formula to determine which cells to format"
Code:
=countblank(C5:Q5)=15
and format it in red

You can dragg it, copy-paste it or apply the format painter to "reproduce" it. I usually adapt range in conditional formatting / manage rules to have something clean (or sometimes I get 10 rules because I copied it for 10 cells)
 
Last edited:
Upvote 0
Hello,

Just select cell BY5 and use following formula for your Conditional Formatting:

Code:
=COUNTBLANK(C15:Q15)=15

Hope this will help
 
Upvote 0
Hello again,

Is there another condition ... on top of the 15 blanks you asked for ... in your first message ...?
 
Upvote 0
The fact that cells C5:Q5 contain data validation ... does not interfere with the Conditional Formatting of your cell ... :wink:
 
Upvote 0
Hello again,

Is there another condition ... on top of the 15 blanks you asked for ... in your first message ...?

There isn't another condition, I just want the cell B5 to fill in red when the cells C5:Q5 are blank (And also do this to B6,7,8, etc
 
Upvote 0
So,

Place your cursor in cell B5 ...

and for your conditional formatting use the formula : =COUNTBLANK(C15:Q15)=15

and format with the Red Fill as needed ...

HTH
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

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