How to address the current cell in conditional format custom 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.
Ok, I found the answer myself. The correct complete formula is:
=and($2:$2=TODAY(),INDIRECT("R"&ROW()&"C"&COLUMN(),FALSE)="")
This rule:
INDIRECT("R"&ROW()&"C"&COLUMN(),FALSE)=""
checks if the current cell is empty.
The current cell is addressed by the first cell of a range in the conditional formatting. In your example, the range is A4:M10
and therefore you can use A4
as "current cell".
Check for empty content:
=A4=""
Relative vs absolute references in conditional formatting work just like copying a formula.
Check that the cell in 2nd row of current column row is today:
=A$2=TODAY()
Combine using
AND
operator:=AND(A$2=TODAY(), A4="")
I have updated a copy of your example spreadsheet - https://docs.google.com/spreadsheets/d/1MY9Jn2xpoVoBeJOa2rkZgv5HXKyQ9I8SM3kiUPR9oXU/edit#gid=0
If I want to check if current cell is empty this is working for me:
=ISBLANK(INDIRECT(ADDRESS(ROW(),COLUMN())))
The cell at the previous row in the column will be
=ISBLANK(INDIRECT(ADDRESS(ROW() - 1,COLUMN())))
etc.