Format entire row if a particular cell in the row is not empty
Asked Answered
N

5

36

I want to format the whole row depending on if a particular cell in that is empty or not. I want conditional formatting to go through all rows and say add a background color if column C in that row is not empty.

How do I fix this?

Normalie answered 4/3, 2014 at 11:2 Comment(1)
Can you tell us what you've tried so far?Zeke
R
50

For illustration assuming "whole row" is ColumnsA:Z inclusive, please try Format - Conditional formatting..., Custom formula is:

=$C1<>""  

with formatting of your choice and Range: A:Z.

Rainger answered 28/1, 2015 at 3:9 Comment(2)
This is the one that worked for me. My range was A2:D999 so that it didn't include the title row.Atalee
support.google.com/docs/answer/…Neighboring
C
13

I was able to do this by selecting the range I want the conditional formatting to apply to (for instance, A:P if you want to apply colour to columns A through P), and then selecting "Custom formula is" and adding =LEN($C:$C)>0. Then you just need to select the colour you want to apply.

Carport answered 28/5, 2015 at 22:4 Comment(0)
T
1

The new Google Sheets can do some of this. Follow the instructions here: https://support.google.com/drive/answer/78413?hl=en

Summary: Format menu => Conditional formatting => "Text contains" drop down menu, select "Custom formula is" => Type "=isblank(C2)" => Add background color => Add range (like: A2:D2)

Although it does not solve completely the question, you will be able to define one rows color based on a cell's value.

Hope it helped.

P.s: While I was testing it I have encountered some bugs in this feature so it may very well happen that it won't be really useful. We'll see...

Taction answered 24/4, 2014 at 17:8 Comment(1)
I got it to work for a selection by selecting the column you want the format applied to and enter in a formula like the following: =IF(ISBLANK($B2:B),false,true) << This means if the column B is not empty in that row, then the column I am formatting will become whatever format I wanted it to be. The ${COLNAM}:{COLNAME} format appears to suggest a rangeTalapoin
S
0

Adding to pnuts' solution, if you're skipping header rows you need to start the enumeration skipping them, as well.

For Example: If you're skipping 1 row, the new formula would be:

$C2<>""
Saliva answered 21/4, 2021 at 6:2 Comment(0)
C
-1

Little late of an answer but hopefully it will help anyone searching:

=IF(a2="",false,true)

And select your range to format, with A2 being something in the range (not sure if this matters).

Works for conditional formatting.

Considerate answered 10/2, 2015 at 15:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.