1
votes

I have the following formula to check if today's date is greater than or equal to the start of the year and I have copied it on a column along with existing rows

IF(NOW() >= DATE(2020,01,01),"TRUE","FALSE")

I want to be able to auto-populate this for newer rows maybe by ArrayFormula or Google script and I will appreciate any form of assistance. Thanks in advance

2

2 Answers

3
votes

Use formula:

=ArrayFormula(IF(LEN(A2:A),NOW() >= DATE(2020,1,1),""))

replace range A2:A with range where you store data.

1
votes

It's very easy, please see this youtube video for this https://youtu.be/7DFr4toDyc8

var current_date=new Date();
if(current_date >= activecell.getValue()){
 activecell.offset(0, 1).setValue("True");
} else {
 activecell.offset(0, 1).setValue("False");
}