year - 1

A

alvin Kuiper

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
 
D

Dave Peterson

=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).
 
D

Dave Peterson

=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).
 
A

alvin Kuiper

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).
 
A

alvin Kuiper

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).
 
M

macropod

Hi Alvin,

Here's one that'll handle leap years:
=MIN(DATE(YEAR(A1),MONTH(A1)-{12,11},DAY(A1)*{1,0}))
 
M

macropod

Hi Alvin,

Here's one that'll handle leap years:
=MIN(DATE(YEAR(A1),MONTH(A1)-{12,11},DAY(A1)*{1,0}))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top