40 votes
Accepted

Apply conditional formatting if other cell is not empty

The ISBLANK formula should serve your purpose well. Create a new rule in the conditional formatting menu. Set the range of your rule to D2:D so that the formatting is applied to column D. Then, in ...
SightSpirit's user avatar
  • 1,788
36 votes
Accepted

Conditional format rule "Text Contains" with a "+" misinterpreted as a formula

Use ~ (tilde) to escape + (plus sign), = (equal sign) and also other special characters like * (asterisk) and ? (question mark) that are used as wildcards. References Apply conditional formatting ...
Rubén's user avatar
  • 44.6k
35 votes

How do I change a cell to the color of the hexadecimal value of a cell in Google Spreadsheets?

=sparkline(1,{"charttype","bar";"color1",A1}) This will provide a solid colored cell using the Hex color code in A1. Also accepts some named colors as well, e.g. "...
Peter John's user avatar
30 votes
Accepted

Conditionally format by day of the week

I had been struggling with this for a long time, but finally cracked it: Use conditional formatting on the column with the dates and type the following as a custom formula: =or(WEEKDAY(A1)=1,WEEKDAY(...
aej's user avatar
  • 316
20 votes

How do I make the "Text contains" evaluate multiple values in Google Spreadsheet?

IMO better without "Text contains". To avoid the possibility of conflicting rules, clear all conditional formatting from ColumnA (assumed because OP does not say where the data is), select it and ...
pnuts's user avatar
  • 17.4k
20 votes
Accepted

How to create a checkbox column, that if selected will create a strike-through across the entire row in Google Sheets?

Conditional formatting: If checkbox ticked in cell A1, change color/strikethrough of cells from B1-F1. Insert a checkbox from "Insert" tab to A1. Select the cells (B1-F1) that needs to be of ...
sreejith r's user avatar
12 votes
Accepted

Conditional formatting with multiple criteria for a range of cells

Writing a formula that satisfies your criteria is a matter of breaking down what your criteria are and implementing corresponding Sheets functions. You have established that the formatting should be ...
SightSpirit's user avatar
  • 1,788
10 votes

How to refer to 'this' cell in a conditional formatting formula?

This is the shortest possible way I've found to reference the current cell in conditional formatting spanning a range: INDIRECT("RC",FALSE). Documentation is here.
Markus Amalthea Magnuson's user avatar
10 votes
Accepted

Combine Custom Formula with Colour Scale in Conditional Formatting

This is now possible by inserting a formula instead of a static number into the box for min/mid/max amount.
Dylan Vander Berg's user avatar
7 votes
Accepted

How do I change a cell to the color of the hexadecimal value of a cell in Google Spreadsheets?

Short answer Use Google Apps Script or a Google Sheets Add-on as there is no built-in feature to set cell background color by color codes. Explanation Google Apps Script is a tool that can be used to ...
Rubén's user avatar
  • 44.6k
6 votes

Conditionally format by day of the week

If the dates are in column A, select them, then do: Format > Conditional formatting... > Format cells if... > Custom formula and put =and(isblank(A:A)=false, or(weekday(A:A)=1, weekday(A:A)=7)) Some ...
Emerson's user avatar
  • 61
6 votes

Advanced date logic in Google Spreadsheets

In case you need more precise times than in the accepted answer, you can use DATEDIF to specify a certain difference between dates. Example: format cell A1 if date in A1 is older than 10 days. ...
alex sichwart's user avatar
5 votes

Automatically add borders around nonempty cells

I could do it just by using conditional formatting in MS Excel and then importing the book to Google sheets. It keeps the conditional formatting of the borders as long as I don't touch conditions for ...
user154134's user avatar
5 votes
Accepted

Using MAX in conditional formatting only evaluates numbers after the cell, regardless of range

Insert $ between A and 2 in the formula. As CF 'steps through' to test each cell in the range in turn the range is being automatically adjusted. So when for example testing A9 it is checking for the ...
pnuts's user avatar
  • 17.4k
5 votes
Accepted

Using setBackgroundRGB() over setBackgroundColors()

As you (maybe) know, the fact that a method is "deprecated" does not mean it doesn't work - just that it might be removed in the future. So you're probably not getting an error, but a warning, and ...
Vidar S. Ramdal's user avatar
5 votes
Accepted

Is there a way to lock or protect conditional formatting in Google Sheets?

I'm afraid that currently it's not possible to use cut & paste / drag & drop. Consider to send a feature request directly to Google through Google Feedback: Click on menu Help > Report a ...
Rubén's user avatar
  • 44.6k
4 votes

Highlight all cells in a range that contain a formula in Google Sheets

Note that it is also possible to use conditional formatting as in (for your case): =isformula(a1) This kind of specification is more flexible than the whole range answer. For example, lets say in ...
cladelpino's user avatar
4 votes
Accepted

How to apply a relative reference in conditional formatting formula?

Try this: =INDIRECT(ADDRESS(ROW(),COLUMN(),4))/REGEXEXTRACT(INDIRECT(ADDRESS(ROW()+1,COLUMN(),4)),"\((.*)\)")*1>1 INDIRECT ADDRESS 1 ROW COLUMN 1 The third parameter in ADDRESS() is ...
ale's user avatar
  • 52.3k
4 votes
Accepted

Google Sheets Alternate Row Color by Unique Sorted Values

Scenario If you have 500 items, in column B, but only 20 of them are unique invoices due to them being broken up into purchase orders. It makes sense to keep them separate so you can more easily ...
Xzila's user avatar
  • 853
4 votes

How to create a checkbox column, that if selected will create a strike-through across the entire row in Google Sheets?

Assuming (1) your checkbox is character ☑ (Code 9745) and your entire row runs to ColumnZ, then please select ColumnsB:Z and apply a Custom formula is of: =$A1="☑" with formatting of Strike-through ...
pnuts's user avatar
  • 17.4k
4 votes

How to create a checkbox column, that if selected will create a strike-through across the entire row in Google Sheets?

Based on the answer from Rubén, I stumbled into a way to do it across the whole spreadsheet. It worked for me as follow: Insert a checkbox from "Insert" tab to H1 (in my case) From tab above, "Format"...
Stefan's user avatar
  • 41
4 votes
Accepted

Conditionally format row borders

The process that would generate a script that makes mentioned conditional formatting includes of course what you mentioned you are unfamiliar with: scripting. A) Learn the basics of google apps ...
Maarten Troost's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible