2
+------------+---------+---------+
|    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 ?

1
  • 1
    No need for a script. Please check the answer below. May 22, 2020 at 3:53

1 Answer 1

1

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:

4
  • I got this error Circular dependency detected. To resolve with iterative calculation, see File > Spreadsheet Settings, and also could you please explain the ranges - Why multiple W10:W13 and X10:X13 May 22, 2020 at 4:08
  • Let assume that I want to fill A:1 when any of the cell from range B:1 to D:1 is filled, What will be the range in arrayformula May 22, 2020 at 4:10
  • Please have a look at the sreenshot. May 22, 2020 at 4:13
  • Thanks It worked May 22, 2020 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.