PC Review


Reply
Thread Tools Rate Thread

Date calculation function?

 
 
Zakynthos
Guest
Posts: n/a
 
      2nd Mar 2009
Is there a function that would allow me to look at a date and return a
result, say, 'before' or 'after' where the date is compared with a base year
date (30 September 2000) and any date before that date returns a 'before' and
any date (EVEN 1 DAY) after that date will return an 'after'

The formula I've tried is:
Start Date Base year Years' service Before or After?
01/10/2001 30/09/2000 1
=IF(Q33<=0,"BEFORE","AFTER")

where Q33 is the number of years' service.

The problem is of course what happens between 1/10/2000 (1 day AFTER base
year) and 31/12/2000 (end of base year) where only the years are subtracted
in my formula and no account is taken of days.

1/10/2000 will still return a '0' of course but I need a formula that will
count an extra DAY or days after 30/9/2000 and before 1/1/2001 to return an
'AFTER' in this date range.

many thanks
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      2nd Mar 2009
Hi,

From what you describe you are simply trying to establish if a date is
before or after your base date of 30/9/2000. If so you don't need the
intermedate calcilation, simply compare the 2 dates

=IF(O33<P33,"Before","After")

Mike

"Zakynthos" wrote:

> Is there a function that would allow me to look at a date and return a
> result, say, 'before' or 'after' where the date is compared with a base year
> date (30 September 2000) and any date before that date returns a 'before' and
> any date (EVEN 1 DAY) after that date will return an 'after'
>
> The formula I've tried is:
> Start Date Base year Years' service Before or After?
> 01/10/2001 30/09/2000 1
> =IF(Q33<=0,"BEFORE","AFTER")
>
> where Q33 is the number of years' service.
>
> The problem is of course what happens between 1/10/2000 (1 day AFTER base
> year) and 31/12/2000 (end of base year) where only the years are subtracted
> in my formula and no account is taken of days.
>
> 1/10/2000 will still return a '0' of course but I need a formula that will
> count an extra DAY or days after 30/9/2000 and before 1/1/2001 to return an
> 'AFTER' in this date range.
>
> many thanks

 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      2nd Mar 2009
If you have a base date in A1 and another date in B1, then:

=IF(A1=B1,"on",IF(B1<A1,"before","after"))

--
Gary''s Student - gsnu200835
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using IF function to perform calculation after specific date Aleksz17 Microsoft Excel Misc 1 3rd Sep 2009 10:31 AM
End Date Calculation (adding a start date duration) Silena K-K Microsoft Excel Misc 5 25th Jan 2008 04:27 PM
Tricky Date calculation: How to calculate a future date chriswessels@xtra.co.nz Microsoft Excel Misc 9 11th Aug 2006 04:24 AM
Coding to show first _weekday_ prior to a date, when date calculation happens to fall on weekend? StargateFan Microsoft Excel Programming 5 9th Dec 2004 09:06 AM
Date calculation function - help iwtci Microsoft Excel Worksheet Functions 2 25th May 2004 06:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 AM.