Excel: Date between two dates

Solved
gladou67 Posted messages 14 Status Membre -  
gladou67 Posted messages 14 Status Membre -
Hello,

I would like to know if a date falls between two others disregarding the days (thus only considering the months and years).
I created a formula that works with days, but since the statistics are calculated by month, it is therefore not usable:

=IF(AND(present>F2;presentF2 Start date
H2 End date
present = today's date

What I want is to be able to say if a person was present during a given month without taking the days into account (if they are there on February 1st, they are considered to have been there all of February).

However, if I add MONTH() to my formula, it only takes months into account and it will tell me that February 2012 is not between March 2011 and June 2012 because 2 is not between 3 and 6.

What function can I use?

Configuration: Windows XP / Internet Explorer 8.0 that's an old browser!

8 réponses

Mike-31 Posted messages 18405 Registration date   Status Contributeur Last intervention   5 145
 
Hello,

the date in C1, this formula will give you the difference between that date and the first day of the month, you need to format the cell to standard

=C1-EOMONTH(C1;-1)

--
See you +
Mike-31

A period of failure is a perfect time to sow the seeds of knowledge.
2