How to reference cells in a conditional formatting formula rule? - google-sheets

I wold like to use the value of the current cell into to "Custom formula is.."
when using conditional formatting.
I would like to enter a "Custom formula", which will check if value of cell is ether'a' or 'b'.
What will be correct syntax?

Please try:
Select the range the conditional formatting is to apply to, say C5:C10. Format, Conditional formatting…, Add new rule, Format cells if…, Custom formula is:
=or(c5="a",c5="b")
Select your Formatting style (Default may suit) and Done.

Related

Conditional Formatting Google Sheet based on a CELL value

I want to highlight the cell with a color of a cell (range G24:G90) if it contains a G4 cell value (dynamic). What is the best way for this?
The best way for us to answer is, when you add samples of what you've tried and what result you get.
Although as much i understood from your short description, you can select those range you mentioned and click on "Conditional Formatting" and on the "Formula Rules" section select "Custom Formula" and type something like this based on your requirement:-
=$G24=$G$4
You can do Formatting Style based on what you like.
You can learn more about advance conditional formatting on this doc :- Click here

Google sheets - Relative conditional format based on cell above

I search in the deepest parts on the internet for a google sheets relative conditional formating based on the cell above value, which means, that whenever i add a new value in the cell below, it will automatically check the cell above value and format the cell according to it.
I've finally came to the solution explained below.
The result will be something like this:
I hope it works for you, weary traveller.
Select the range of cells that you want to format.
Go to >Format > Conditional Format > Add rule.
Under format rules select the option "Custom Formula is".
Paste the next formula if you want to check that your current cell is BIGGER THAN the cell above: =INDIRECT(ADDRESS(ROW();COLUMN())) > INDIRECT(ADDRESS(ROW()-1;COLUMN()))
OR the next formula if you want to check that your current cell is LOWER THAN the cell above: =INDIRECT(ADDRESS(ROW();COLUMN())) < INDIRECT(ADDRESS(ROW()-1;COLUMN())).
Select the color you like to apply, and click in DONE.
If the range of cells is A2:G, this rule will also work:
=AND(A2<>"",A2<A1) [RED]
=AND(A2<>"",A2>A1) [GREEN]

Google Sheets formula for conditional formatting: "if cell contains exact text text" then

Trying to write a basic conditional formatting on a cell so "if cell C58 contains the string 'long cont' then turn cell D58 turn it green".
Any ideas what the syntax is?
Thank you.
Ed
Click the cell you want to highlight.
Open the conditional formatting dialog.
Select "custom formula is".
Type your formula, e.g. =(I192 = "yes").

Conditional formatting based on another cell's text

I have a Google Sheets table of names and statistics that go along with said names. I'm trying to use a dropdown menu on a specific cell so that when I select a specific name from the dropdown, all of the cells that start with the same name will be highlighted.
Assuming the dropdown is in B2. Please select entire sheet and: Format > Conditional formatting..., Format cells if... Custom formula is and:
=regexmatch(A1,"^"&$B$2)
with highlighting of your choice and Done.
Since for all of the cells that start with the same name this could be slow.
custom formula: =IF(I1=H$4, 1)

Conditional formatting with "and"

I have a custom formatting rule which changes the color of a series of cells. The formula is:
=and(I$4>=$D5,I$4<=$E5)
I want to add one more thing, which is to display the text in the cells which is found in C5. Can anybody help?
adding text in a cell with conditional formatting is not possible. you will need to add it with standard formula:
=ARRAYFORMULA(IF(AND(D5:D<=$I$4, E5:E>=$I$4), {C5:C}, ))

Resources