Date Referencing

lionstud31

Board Regular
Joined
Oct 16, 2006
Messages
89
I am trying to make my spreadsheet update the dates in it by just putting in the year. Here's what I'm doing exactly: In cell A1 I want to enter a year. Then, I want the first day of each month to be calculated starting in D1 heading right (Jan 1st (and the year) in D1, Feb 1st (and the year) in E1 and so on). I also want the month end in the second row (Jan 31st (and the year) in D2, Etc. Anyone know how to do this? Thanks in advance.[/img]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
59,079
Office Version
  1. 365
Platform
  1. Windows
Patience, my friend! Give people more than a few minutes to respond!

In cell D1, enter this formula:
=DATE($A1,COLUMN()-3,1)
and in D2, enter this formula:
=DATE($A1,COLUMN()-2,0)

Then copy these formula across the rows 1 and 2, respectively, to get your twelve months worth of dates.
 

AussieJac

Board Regular
Joined
Jul 7, 2005
Messages
57
Is this what you're looking to do?


Cell A1 = 2006

Cell D1= "=DATE($A$1,1,1)" Result= 01-January-2006
Cell D2= "=EOMONTH($D$1,0)" Result = 31-January-2006

Cell E1= =DATE($A$1,2,1) Result= 01-February-2006
Cell E2= =EOMONTH($E$1,0) Result= 28-February-2006
etc

So when you change Cell A1 to "2007" then all the dates will update to the correct dates in 2007.

Hope it helps. :p
[/code]
 

Forum statistics

Threads
1,141,720
Messages
5,708,090
Members
421,545
Latest member
TWR

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top