A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Show prior year based on date in other cell



 
 
Thread Tools Display Modes
  #1  
Old June 17th, 2009, 05:18 PM posted to microsoft.public.excel.worksheet.functions
munchkin
external usenet poster
 
Posts: 19
Default Show prior year based on date in other cell

Is there any way to copy a full date (mm/dd/yyyy), past it into the cells
below, but have the year change to the prior year in descending order?

Specific info: B4 shows the current mm/dd/yyyy of a file. Depending on how
many years we have had this account we want B5 through B?? to show same
mm/dd, but prior yy in descending order.

Right now we are copying B4 & pasting in the rows below, then manually
changing the year in each cell - is there an easier to do this?

Thanks much!
  #2  
Old June 17th, 2009, 05:27 PM posted to microsoft.public.excel.worksheet.functions
Gary''s Student
external usenet poster
 
Posts: 7,584
Default Show prior year based on date in other cell

If A1 contains a date, then in A2 enter:

=DATE(YEAR(A1)-1,MONTH(A1),DAY(A1)) and copy down

just be careful of Feb and leap years.
--
Gary''s Student - gsnu200857


"Munchkin" wrote:

Is there any way to copy a full date (mm/dd/yyyy), past it into the cells
below, but have the year change to the prior year in descending order?

Specific info: B4 shows the current mm/dd/yyyy of a file. Depending on how
many years we have had this account we want B5 through B?? to show same
mm/dd, but prior yy in descending order.

Right now we are copying B4 & pasting in the rows below, then manually
changing the year in each cell - is there an easier to do this?

Thanks much!

  #3  
Old June 17th, 2009, 05:30 PM posted to microsoft.public.excel.worksheet.functions
joeu2004
external usenet poster
 
Posts: 1,748
Default Show prior year based on date in other cell

"Munchkin" wrote:
Is there any way to copy a full date (mm/dd/yyyy), past it into the cells
below, but have the year change to the prior year in descending order?


One way.... Put into B5 and copy down:

=date(year(B4)-1,month(B4),day(B4))

Caveat: That does not work well when B4 is Feb 29 and the number of
previous years exceeds 3. For that, use:

=min(date(year(B4)-1,month(B4),day($B$4)), date(year(B4)-1,1+month(B4),0))

and format as Date or a Custom date format.


----- original message -----

"Munchkin" wrote in message
...
Is there any way to copy a full date (mm/dd/yyyy), past it into the cells
below, but have the year change to the prior year in descending order?

Specific info: B4 shows the current mm/dd/yyyy of a file. Depending on
how
many years we have had this account we want B5 through B?? to show same
mm/dd, but prior yy in descending order.

Right now we are copying B4 & pasting in the rows below, then manually
changing the year in each cell - is there an easier to do this?

Thanks much!


  #4  
Old June 17th, 2009, 07:44 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default Show prior year based on date in other cell

=EDATE(B4,-12)

This formula is required ATP add-ins


"Munchkin" wrote:

Is there any way to copy a full date (mm/dd/yyyy), past it into the cells
below, but have the year change to the prior year in descending order?

Specific info: B4 shows the current mm/dd/yyyy of a file. Depending on how
many years we have had this account we want B5 through B?? to show same
mm/dd, but prior yy in descending order.

Right now we are copying B4 & pasting in the rows below, then manually
changing the year in each cell - is there an easier to do this?

Thanks much!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.