google sheets: custom formatting basing on cell below - google-sheets

I have column "start of the period" with dates like
2014-01-01
2014-01-07
2014-02-01
2024-02-12
and so on; I want cell with start of the current period to be highlighted, so I tried custom formatting formula
=AND(TODAY() >= R[0]C[0]; TODAY() < R[1]C[0])
and it doesn't work. Is it even possible in new sheets without custom onEdit() script?

Yes it is possible. Use this in the custom formatting formula for the 1st cell
=and(today()>A1,today()<A2)
Google spreadsheets automatically changes the reference as you move down the row. So for the next row, the condition would become =and(today()>A2,today()<A3).
Interestingly, if you check the conditional formatting formula, it still displays the former formula, but works just fine. Check this sheet.

Related

Conditionally format all the cells with dates of the current week

I have a table that looks like this:
some text 14.09.2022
some text 15.09.2022
some text 23.10.2022
And I need to conditionally format each cell in the second column if the date in that cell is during the current week.
I have tried different solutions from the Internet[^1], but neither works for me: each time Google Sheets says my formulas are wrong. Any help?
[^1]: For example, I have tried to adopt the formula found here.
Try below custom formula in CF rule.
=WEEKNUM($C2)=WEEKNUM(TODAY())

How to copy conditionnal formating of a row to others rows in Google Sheets?

Need some help. I'm currently making a Google Sheets, and I need some conditional formating. I need a row to be formatted with the condition on one of her cells.
For example, I need to formate A2:I2 with the formula =$H$2="No".
This was the easy part. I can do that.
The part that I fail is :
I have like 30 or 40 rows to formate like that, with the condition on the cell of the row. (H15 for A15:I15, H21 for A21:I21...). I tried to select the first row, copy it, and special past the formatting to another row, but Google makes some weird shit. It creates a new rule, but keep the previous cells range and add the currently selected. And the formula stays on the $H$2. I know it's because I put some $ in the name of the cell, but if I don't, it will not formating the entire row. Juste the first cell.
My question is :
How can I properly copy/paste the conditional formatting of the first row to the others one, with the condition correctly on the cell of each row, and keeping the formatting on the entire row?
The meaning of the $ sign is the following:
$H$2: it will lock that cell only,
H$2: it will lock that column,
$H2: it will lock that row (I think this is the one you are looking for),
So you can set the range to be: A2:I
And the formula to be: =$H2="No"

Display today's date in every cell in a single column in a google sheet

I'm trying to display the current date in every cell in a single column in a google spreadsheet. =today() displays the current date in any cell, but I can't figure out how to make it work in an entire column.
I tried =arrayformula(TODAY()), but it only works in the cell it's in.
Any ideas?
You need some way of introducing a condition on each row, e.g.
=ArrayFormula(IF(ROW(A:A),TODAY()))
You have to make an array operation - any, to make Arrayfromula works, so eg:
=ArrayFormula(IF(row(A1:A),today(),))
will work

How to use conditional formatting in Google Sheets to highlight row based on value in cell

I have a google sheets document where I have cells A1:Z1. In AA1, I have a value total. If that value is greater than 5, I would like A1:Z1 to be highlighted in red. I then want to do this for every row down the sheet. Could somebody help be out with this? I tried using other answers here, but I can't get it to work.
First of all take a look at Use conditional formatting rules in Google Sheets.
On your computer, open a spreadsheet in Google Sheets.
Select the cells you want to apply format rules to (A1:Z1).
Click Format and then Conditional formatting. A toolbar will open to the right.
Under the "Format cells if" drop-down menu, click Custom formula is. If there's already a rule, click it or Add new rule > and then Custom formula is.
On custom formula put this =SUM(A1:Z1) > 5
Choose other formatting properties.
Click Done.
The result will be this.

Conditional Formatting on Google Sheets depending on cell in other sheet

So I have one sheet that's a timeline, with the first column being an ascending list of dates and the second being a description of the event that happens on that date.
Another sheet has a cell with a specific date.
I would like the cell on the first column of the first sheet whose date is the date on that second sheet's cell to be formatted. How do I do that?
If the second sheet has a date in cell A1, then the first column of the first sheet should have conditional formatting "Value is equal to... " =indirect("Sheet2!A1")
The use of indirect is necessary because otherwise conditional formatting rules cannot refer to other sheets.

Resources