Google-sheets – How to autofill specific cell when any next cell is filled

google sheetsgoogle-sheets-arrayformulagoogle-sheets-dates

+------------+---------+---------+
|    Date    |  Col1   |  Col2   |
+------------+---------+---------+
| 2018-01-01 | Value 1 | Value 1 |
| 2018-01-01 | Value 2 | Value 2 |
| 2018-01-01 | Value 3 | Value 3 |
+------------+---------+---------+

I want to autofill Date column's cell with current date, when any of the Col1 and Col2 is filled in that row.

How can I do that, Is there any formula or need to write script ?

Best Answer

You could use this formula

=ARRAYFORMULA(IF((W10:W13<>"")+(X10:X13<>""),TODAY(),""))

and then give the desired date format to the results from the menu.
(Please adjust ranges to your needs)

enter image description here

Functions used: