Jasdeep Singh
Jasdeep Singh

Reputation: 111

I need to print the date automatically for the current Month

I need to print the date for the current month in the first column of my google sheet automatically.

I think this can be done through javascript but not sure what code will go in for that? Not good at javascript. I have a sheet here: https://docs.google.com/spreadsheets/d/1OyyPKKflKWB3ewLlcCAAkbPE_HMYNnwWUEfP5KOz0o8/edit?usp=sharing

Don't have any code yet.

I want the date for the current month to automatically get inserted in the first column up till the month. For example: If its May, the date should be entered up to 31st and so on...

Upvotes: 1

Views: 947

Answers (1)

player0
player0

Reputation: 1

delete everything in A4:A range and paste this into A4 cell:

=ARRAYFORMULA(TO_DATE(ROW(
 INDIRECT("A"&DATE(YEAR(A3), MONTH(A3), DAY(A3)+1)):
 INDIRECT("B"&EOMONTH(A3, 0)))))

0

this will calculate all date ranges between A3 cell and end of the month of A3 cell

A3: =DATE(YEAR(TODAY()), MONTH(TODAY()), 1)

Upvotes: 1

Related Questions