I have a Google Docs SpreadSheet, where in the column A are dates (A1: 2013-11-22, A2: 2013-11-23, A3: 2013-11-24 etc). I would like to automatically highlight - set a background color for a row, where in the column A is today's date. To have every day a different row highlighted.
I expect that I will need a script, IMHO this is not possible to be done with conditional formating in Google Docs SpreadSheet.
Any idea how to do it? Thanks a lot!
Where A houses dates, try this.
Enter this custom formula:
Choose your background and text color
You could also just have a new column in the spreadsheet do the date matching and return a flag if it's today...
=ARRAYFORMULA(IF(A1:A =TODAY(), 1, ""))
- formula in cell D1then try..
If you want it to be automatic on spreadsheet open you will have to install an installable onOpen that will call the below function (from script editor goto ressources > this script triggers > add a new trigger > sreadsheet / on Open)
And here is the code for columns: (see below for rows)
this version to colorize rows
Note : if you want it to run fully automatically based on a timer it's perfectly doable, just change the ss and sh variable using
openById
andgetSheetByName
(see doc here)and set up a timer to make it run every day around 1 AM.I have modified an example from Serge (thanks, Serge!), dates are in the A column. Rows with a date have background color cleared, other rows are intact. Bonus: a custom menu to run a script on active sheet.
This is how I did it. I did conditional formatting and picked my range, then in "format cells if..." I chose custom and used this formula:
I have my dates in the B column and this highlights the entire row, within my range, for today's date.
The simple answer is like Clinet.
Format -> Conditional Formatting...-> (Format cells if...) Custom formula is
Then fill in =cells-range=today()
For example: =$I$2:$BC$2=TODAY()