Comparing 4 dates and getting 1 headache

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,
I have a problem hopefully some one can help me out with.
I have the following 4 dates…

Beginning Date of Service
Ending Date of Service
Eligible Beginning Date of Service
Eligible Ending Date of Service

I need a formula that will compare the Beginning Date of Service to the
Eligible Beginning Date of Service, if the Eligible date is later it will
take that if is earlier then it will take the Beginning Date of Service and
compare it to the Ending Date of Service if the Eligible Ending Date of
Service
is later then the Ending Date of Service or the Ending Date of Service if
it is later then the Eligible Ending Date of Service

In other words I need a count of the number of days that fall in both groups.

Ideas?

Thanks!
 
First, take a deep breath and slow down.
Next, break this into small bites.

Let's assume
Beginning Date of Service - Col A
Ending Date of Service - Col B
Eligible Beginning Date of Service - Col C
Eligible Ending Date of Service - Col D

In Col E, try
=IF(A1>B1, A1, B1)
In Col F, try
=IF(C1>D1, C1, D1)
In Col G, try
=DATEDIF(E1, F1, "d")

Cols A-F should be formatted as DATE, Col G should be formatted as
NUMBER.

For mare on the DATEDIF function, see
http://www.cpearson.com/excel/datedif.htm

HTH
Ed
 
Back
Top