How to Lock Cells in Google Sheets
Protecting your work in a shared Google Sheet is one of those essential skills that separates careless collaboration from professional data management. Whether you’re building a...
Read the guide ›
Conditional formatting changes a cell's appearance when a rule is true. Select the cells, open Format, Conditional formatting, choose a condition and save its formatting style. It highlights a result; it does not change the underlying value or reject an entry.
Use the computer interface for the steps below. The formulas use English function names and comma separators. Other spreadsheet locales may use different separators.

80, choose a readable fill style and click Done.The sample highlights 90 and 80 while leaving 70 and 60 unchanged. If your scores are stored as percentages such as 80%, use the corresponding decimal threshold, 0.8. A number displayed as 80 and a percentage stored as 0.8 are different values.
Suppose A contains tasks, B contains due dates and C contains statuses. To highlight rows marked Pending, apply a rule to A2:C100. Choose Custom formula is and enter:
=$C2="Pending"
The dollar sign locks column C, while the row number changes for each row. Without the locked column, the reference shifts as the rule is applied across the row. Write the formula for the first row of the selected range, row 2 in this example.
Google's conditional formatting reference explains this distinction between absolute and relative references. A working formula applied to the wrong range can still highlight the wrong cells.
For identifiers in A2:A100, apply this custom rule to that same range:
=AND(A2<>"",COUNTIF($A$2:$A$100,A2)>1)
The first condition excludes blank entries. COUNTIF checks the fixed range and highlights every occurrence of a repeated value. With IDs 1001, 1002, 1001, 1003 and 1002, both 1001 cells and both 1002 cells highlight. The 1003 cell does not.
To highlight only later occurrences instead, use =AND(A2<>"",COUNTIF($A$2:A2,A2)>1). The expanding range includes the current row and everything above it. Review our COUNTIF and duplicate-review guides before deleting any data.
For date-only values in B, this rule flags past dates across A2:C100 while excluding blanks and text:
=AND(ISNUMBER($B2),$B2<TODAY())
Use real date values and confirm the spreadsheet's time zone. The date sorting guide separates date conversion from display formatting. If your data contains timestamps, define the time boundary explicitly rather than assuming a date-only comparison covers a whole day.
Combine tests inside functions such as AND or OR. Google Sheets does not use an infix AND operator between two formula expressions. For text patterns, the function is REGEXMATCH, not REGEX. Use a simple value condition when it already does the job.
Overlapping rules need an intentional order. Google evaluates them in the listed order, and the first true rule determines the format. Move the rule you want to take priority higher in the list. Done saves a rule; it is not a Stop if true toggle.
Use Color scale for a gradient across numeric values. Select a sensible minimum, midpoint and maximum for the data rather than assuming a particular default palette. A fixed scale from 0 to 100 makes different score groups easier to compare than separate automatic scales.
Keep the numbers and text visible. A green fill alone is not enough to communicate Complete to someone who cannot distinguish the color. Our IF formula guide helps when a visible text result would explain the condition more clearly.
Copy the source cells, then use Edit, Paste special, Paste conditional formatting only at the destination. Ctrl+Shift+V is paste values only in the standard PC shortcuts, so it is not the command for copying conditional rules. Check the new range and relative references afterward.
If a result looks wrong, inspect the applied range, first-row reference, stored data type and rules above it. Compare a cell that should match with one that should not. Google's paste-special documentation distinguishes copying values, validation and conditional formatting.
Conditional formatting is useful for reviewing a website crawl export. Put the status codes in one column. A rule that highlights values of 400 or more in red, and another that highlights values from 300 to 399 in amber, makes broken links and redirects stand out among thousands of rows. A second rule with a custom formula, such as =LEN(C2)>60 applied to a title column, can flag titles longer than you want.
Keep the rules few and documented, since several overlapping colors make a sheet harder to read rather than easier. Freeze the header row first, as described in our guide to freezing rows, so the column names stay visible. Our SEO team reviews technical audits this way before deciding which fixes matter most.
Rules travel with the sheet, so a template with the audit rules already in place saves setting them up for every new export. Paste the new data into the same columns and the highlighting follows.
No. It changes the appearance of cells when a condition is true. Use validation or a separate workflow when entries need to be restricted.
Apply the rule to the full row range and lock the status column. For A2:C100 with status in C, use =$C2="Pending".
Rules are evaluated in their listed order. Put the rule that should take priority above conflicting rules, then test a cell that meets both conditions.
Copy the source cells and choose Edit, Paste special, Paste conditional formatting only. Review the destination range and adjusted references.
Check one URL in Swiss Knife SEO without an account. A free account supports crawls of up to 100 URLs.
Protecting your work in a shared Google Sheet is one of those essential skills that separates careless collaboration from professional data management. Whether you’re building a...
Read the guide ›Checkboxes in Google Sheets are interactive elements that store TRUE or FALSE values in a cell. When you click a checkbox, it toggles between checked (TRUE)...
Read the guide ›Collaboration is at the heart of modern work. When you keep spreadsheets locked in a single account, you create bottlenecks. Changes require email exchanges. Team members...
Read the guide ›