Google sheets conditional formatting range of dates - google-sheets

I'm trying to highlight cells based on a range of dates so that one can visually see from what month to what month one unit plan takes.
Please see this page (row 9) as a reference: https://docs.google.com/spreadsheets/d/1VDE1IdRJ7EB59NDos_A7DEUBm5LA75akbqiRVoH5IkI/edit#gid=222884255&range=G9
For example, if a unit goes from 4/2023 to 6/2023, I'd like April, May, and June boxes to be highlighted. I used the "custom formula" option in conditional formatting and input this formula:
=AND(($G$9:$R$9>=$E9),($G$9:$R$9<=$F9))
However, nothing is lighting up for me. The dates I'm using come from another Sheet (Grade 7). Could that be an issue?
Any help would be greatly appreciated. Thank you!
Hoping to see highlighted cells but the colors are not showing up.
I tried this formula: =AND(($G$9:$R$9>=$E9),($G$9:$R$9<=$F9))

Your sheet is not public, from what I guess, you may try with next formula for the whole range. It will automatically expand G to R:
=AND((G$9>=$E9),(G$9<=$F9))

Related

How can I set a cell to highlight after X hours have passed in Google Sheets

I have a Google Sheet where a column is filled with times in a 24 hour format (XX:xx), how can I select a cell to highlight red after 3 hours have passed with conditional formatting?
I've been trying to mess with the Now() command in custom formulas for like 2 hours now, but I can't seem to get it to work. PLZ HELP!
To Highlight cells if exactly 3 hours 03:00:00.000 have been passed you need to paste this formula in format>conditional formating. > format cell if - Custom Formula, take a look at the example in this sheet.
=ArrayFormula(IF(A3:A="",,IF(A3:A-NOW()>0.13,"True","False") ))
A3:A-NOW()>0.13 to check if the date in the range A3:A minus NOW() is greater than 0.13 which represent an hour 03:00:00.000 as a number.
To check and highlight cells when certain duration have been passed and be able to adjust the duration from a cell you need to paste this formula in cell B2 to get True or False output.
=ArrayFormula(IF(A2:A="",,IF(A2:A-NOW()>$E$2,"True","False")))
It can be used as a formula in format>conditional formating.
take a look at the example in this sheet.
the columns highlighted in blue is for demonstration it can be deleted.
For anyone who has the same issue, it has been solved. Looks like the Now() call requires both the time and date to be inside the cell in order to work.
The formula I used to highlight cells that are older than 3 hours is
=(Now()-TIME(3,0,0))
A friend also showed me a different formula that seems to do the same thing
=IF(NOW()>A2+3/24,TRUE(),FALSE())
You can change the time by changing the (3,0,0) to Hrs,Min,Sec of your choosing, for the second formula, you can change it by adjusting the fraction value (3/24 for 3 hours, etc)
These will only work if you have the date and time in the cells you are formatting (e.g. If you timestamp with Ctrl+Alt+Shift+;) it will not work if you timestamp with just the time (Ctrl+Alt+Shift) as that seems to set the year to 1899 for some reason.
It would be nice if I could get these working without a date, but I have not found a way to do that.

Google Sheets: Conditional formatting

I'm looking to do conditional formatting on a sheet, by comparing cell values between them on a same line.
For example (based on the shared screenshot below), I would like to highlight on line 3 the cell B3 (because it's the higher avg price / box compared to F3, J3 and N3). Etc...
Any idea how I can do this?
Thanks for you help! :)
Sample screenshot:
You need to apply the below formula in the conditional formatting window with the range selected as B3:B, F3:F, J3:J, N3:N
=B3=MAX($B3,$F3,$J3,$N3)
Sample Screenshot:
Note: formula in the screenshot is incorrect.

Conditional formatting dates relative to a name in google sheets

I'm relatively new to using google sheets and formulas and what not.
I am trying to highlight a row of cells using conditional formatting based on whether or not a name and date are both present in another range of cells.
In the case of the names, I need an exact match which I have figured out already easily enough.
In the case of the dates, I need it to highlight only if the leftDate is less than(prior) or equal to the rightDate displayed in another range of cells.
For example,
Names and Dates
In the left section of the sheet, the row containing Jacob should be highlighted due to his name being present in the right section of the sheet AND the date being prior.
Where as Nicks row in the left section of the sheet would not be highlighted due to the date being after.
Andrews row on the left would be highlighted due to having the same date.
Mikes row would not due to his name not being present on the right section.
so far for comparing the names I am using a COUNTIF function, and to enable both names and dates to function I have it nested in an AND function, like so
=AND(COUNTIF(leftNames = rightNames),COUNTIF(leftDates>=rightDates in relation to name))
The name portion works it is the date portion I am struggling with, sorry for the long winded explanation. Any help is appreciated!
Thanks
try for range A3:D:
=INDEX(IF($B3<VLOOKUP($A3, $F$3:$G, 2, 0), 1,
MATCH($A3&$B3, $F$3:$F&$G$3:$G, 0)))

Highlight the working days using conditional format

here I have a sheet in which there is a calendar and in that I need to highlight some days according to some names. If we tick on a name we need to highlight some days in that calendar. Instructions are there in the sheet and an example is also there in the Sheet 2. Please take a look.
https://docs.google.com/spreadsheets/d/1UqQX2uXeRkLJNjaR1wfQfbrgqgnCH1eJWRI8IH4xyN4/edit#gid=0
Thanks in advance
For row 3 set the range to A3:G3 and use this custom formula
= (A$3<>"")*($I$3=TRUE)
Add a rule for every row, updating the range and the custom formula. So for row 4 the range would be A4:G4 and the custom formula
= (A$4<>"")*($I$4=TRUE)
Also see the tab 'JPV' where you see these formulas applied.
See if that works?

How do I set conditional formatting based on data in two different cells?

I have a Google Sheet and I want to set a fill color in one cell based on a date and a text value in two different cells. Essentially, A1 should be red if B1 date is older than 15 days ago AND C1 reads "These are words" I have tried multiple things but I cannot seem to find any formulas that work. I have listed below what formulas I have tried along with what effect they had. Any help would be appreciated.
Additionally, I apologize if this has been answered somewhere, I looked but could not find anything.
Only highlights date that is EXACTLY 15 days ago
=AND($B:$B=TODAY()-15,$C:$C="These Are Words")
Does not Highlight anything
=AND(=ISBETWEEN($B:$B=TODAY()-15,=TODAY(),$C:$C="These Are Word")
I have also tried setting specific cells (i.e. B1 instead of $B:$B)
Example of desired effect
Instead of the = operator use the <= operator:
=AND($B:$B<=(TODAY()-15),$C:$C="These Are Words")

Resources