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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
year - 1
Hi
Is there a way in a worksheet - Functions where i can take a cell value (date) and make it a year less like 01-11-2009 (danish date) shall be 01-11-2008 I can in VB, but can't find it in a waotksheet alvin |
#2
|
|||
|
|||
year - 1
=date(year(a1)-1,month(a1),day(a1))
It'll work for almost every date except the leapyear dates (Feb 29, 2008 won't give Feb 29, 2007). alvin Kuiper wrote: Hi Is there a way in a worksheet - Functions where i can take a cell value (date) and make it a year less like 01-11-2009 (danish date) shall be 01-11-2008 I can in VB, but can't find it in a waotksheet alvin -- Dave Peterson |
#3
|
|||
|
|||
year - 1
=DATE(YEAR(A1)-1,MONTH(A1),DAY(A1))
Just be careful about leap years. -- Gary''s Student - gsnu200853 "alvin Kuiper" wrote: Hi Is there a way in a worksheet - Functions where i can take a cell value (date) and make it a year less like 01-11-2009 (danish date) shall be 01-11-2008 I can in VB, but can't find it in a waotksheet alvin |
#4
|
|||
|
|||
year - 1
Thanks Alvin "Dave Peterson" skrev: =date(year(a1)-1,month(a1),day(a1)) It'll work for almost every date except the leapyear dates (Feb 29, 2008 won't give Feb 29, 2007). alvin Kuiper wrote: Hi Is there a way in a worksheet - Functions where i can take a cell value (date) and make it a year less like 01-11-2009 (danish date) shall be 01-11-2008 I can in VB, but can't find it in a waotksheet alvin -- Dave Peterson |
#5
|
|||
|
|||
year - 1
Hi.
=EDATE(A1,-12) Note that this will move a Feb 29 to Feb 28. Dana DeLouis alvin Kuiper wrote: Hi Is there a way in a worksheet - Functions where i can take a cell value (date) and make it a year less like 01-11-2009 (danish date) shall be 01-11-2008 I can in VB, but can't find it in a waotksheet alvin |
#6
|
|||
|
|||
year - 1
Hi Alvin,
Here's one that'll handle leap years: =MIN(DATE(YEAR(A1),MONTH(A1)-{12,11},DAY(A1)*{1,0})) -- Cheers macropod [Microsoft MVP - Word] "alvin Kuiper" wrote in message ... Hi Is there a way in a worksheet - Functions where i can take a cell value (date) and make it a year less like 01-11-2009 (danish date) shall be 01-11-2008 I can in VB, but can't find it in a waotksheet alvin |
Thread Tools | |
Display Modes | |
|
|