Jul 08 2020 01:29 PM
I'm trying to put in a formula to enter dates automatically on my sheets. For example: I have 31 sheets for the month of July. I want to have the date on each sheet in the same cell. Is there a way to do this without having to enter it manually on each sheet? I'm using excel 2016.
Jul 08 2020 02:06 PM
If you mean the same date for all sheets, you may select all shift (click on first, Shift, click on last) and enter the date into the cell. Unselect sheets.
Jul 08 2020 02:09 PM
Jul 08 2020 02:14 PM
@vtyree , you can extract the day from the sheet name using this formula:
=MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,255)
Then use the Date function to get the whole date:
=DATE(2020,7,MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,255))
Jul 08 2020 02:49 PM
Ah says the man when you open his eyes. I didn't catch the 31 sheets for July as in 31 days in July. Good catch @TheAntony . That solution is good IF the sheets are named 1, 2, 3, etc...
If not you can use this formula in the Name Manager to define a Name like "PrevSheet" as a reference to the same cell in the previous sheet:
=INDIRECT(INDEX(GET.WORKBOOK(1),SHEET()-1)&"'!R"&ROW()&"C"&COLUMN(),FALSE)
then:
Jul 08 2020 03:22 PM
SolutionJul 10 2020 10:16 AM
I mean, a different date on each sheet...for example 7/1/20, 7/2/20 and so on. @SergeiBaklan
Jul 10 2020 10:18 AM
OMG thank you!!! It worked!!!! @SergeiBaklan
Jul 11 2020 01:16 PM
@vtyree , you are welcome
Dec 05 2023 06:57 AM
Dec 05 2023 07:07 AM
@jbalderas please see attached. Enter it in the box for the date you wish to use. Change the number to what ever month you are using.
Jul 08 2020 03:22 PM
SolutionWhen simply select sheets 2-... and enter into the cell
=DATE(2020,7,SHEET()-1)