Colour all blank cells in a row if one cell in row has text.

Ferrito

New Member
Joined
Jul 10, 2024
Messages
2
Office Version
  1. Prefer Not To Say
Platform
  1. Windows
Hello, New to this site so apologies if this has been covered before and I just don't know how to search for the answer.

I want to use conditional formatting to make blank cells yellow in any/all columns if there is text in column A.

For example, column A could be order numbers, column B could be client name and column C could be date due etc etc.
If column A is blank (i.e. all the rows at the bottom of the sheet) then nothing happens.
If column A has something in it (text or number), then the conditional formatting will look at all other cells in that row - if they have text in then nothing happens, but if they are blank they turn yellow.

Do I have to create a separate rule for each column? or can it be done spreadsheet wide?

Hopefully that made sense. Any help much appreciated.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Welcome to the Board!

No, you can do this all at once.

First, select the entire range you want to apply this coloring to. Let's say it is B2:Z100.

Then, go to Conditional Formatting, choose the Formula option (last one), and write the CF formula as it applies to the FIRST cell in your selection above (if you write the formulas correctly, Excel will automatically adjust it for all other cells in that range).
So that formula should look like:
Excel Formula:
=AND($A2<>"",B2="")
and then choose your desired formatting color.

Note that we MUST put the "$" in front of column A to lock that column reference down, so that EVERY cell looks at column A in their row to see if anything is in it.
 
Upvote 1
Solution
Welcome to the Board!

No, you can do this all at once.

First, select the entire range you want to apply this coloring to. Let's say it is B2:Z100.

Then, go to Conditional Formatting, choose the Formula option (last one), and write the CF formula as it applies to the FIRST cell in your selection above (if you write the formulas correctly, Excel will automatically adjust it for all other cells in that range).
So that formula should look like:
Excel Formula:
=AND($A2<>"",B2="")
and then choose your desired formatting color.

Note that we MUST put the "$" in front of column A to lock that column reference down, so that EVERY cell looks at column A in their row to see if anything is in it.
Thank you!
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,112
Members
453,021
Latest member
Justyna P

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