calculating dates

  • Thread starter future spreadsheet master
  • Start date
F

future spreadsheet master

I'm wondering if I am able to calculate a date based on two different cells.
A1 is my actual start date 6/28/2006
C1 is the current date (ex 5/13/2009)
B1- I want this is be the start date for the person's year at work. so I
want it to calculate 6/28/2008. The catch is I can't just go -1 on the year
because when the current date is 7/1/2009 (C1) I need B1 to be 6/28/2009 to
relect only being 3 days into that work year.
Is this possible? If so, how?
 
R

Roger Govier

Hi

In B1
=A1-DATE(YEAR(C1),6,28)

--
Regards
Roger Govier

"future spreadsheet master" <future spreadsheet
(e-mail address removed)> wrote in message
news:[email protected]...
 
S

smartin

future said:
I'm wondering if I am able to calculate a date based on two different cells.
A1 is my actual start date 6/28/2006
C1 is the current date (ex 5/13/2009)
B1- I want this is be the start date for the person's year at work. so I
want it to calculate 6/28/2008. The catch is I can't just go -1 on the year
because when the current date is 7/1/2009 (C1) I need B1 to be 6/28/2009 to
relect only being 3 days into that work year.
Is this possible? If so, how?

This will do it, but it lacks finesse...

(line breaks inserted for clarity... remove them in your formula)
=IF(C1<DATE(YEAR(C1),MONTH(A1),DAY(A1)),
DATE(YEAR(C1)-1,MONTH(A1),DAY(A1)),
DATE(YEAR(C1),MONTH(A1),DAY(A1)))
 
S

smartin

Sheeloo said:
Try this in B1
=C1-MOD(C1-A1,365.25)+1

That will be off by one day in many circumstances. Try it with A1 =
2004/03/01 and today's date in C1.
 

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

Top