how to check if date falls within range

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

Guest

I have a start date and end date
I need to check if the month and year fall within the range

Start Date & End Date are in sheet 1
Date to check is in sheet 2

Depending on the above condition, if true, I need to sum

Kindly suggest ways as I am at a loss to understand how to do it.

Thanks
 
Hi!
Start Date & End Date are in sheet 1

A1 = start date
B1 = end date
Date to check is in sheet 2
A1:A100

Depending on the above condition, if true, I need to sum (Sheet2?)

B1:B100

=SUMPRODUCT(--(Sheet2!A1:A100>=A1),--(Sheet2!A1:A100<=B1),Sheet2!B1:B100)

Assumes the formula is entered on sheet1.

Biff
 
Thanks for the reply Biff.

But you see, the start dates & the end dates are in a range in sheet1.
A1:A100 -> Start Dates
B1:B100 -> End Dates

In sheet 2, there is one date which I need to check if it falls within that
date.
C1

If the condition is true then I need to sum a range in sheet 1.

Kindly note that I just need to check if month & year of C1 falls within the
month and year of A1:A100 and B1:B100

Thanks
 
=SUMPRODUCT(--(Sheet1!A1:A100>=Sheet2!C1),--(Sheet1!B1:B100<=Sheet2!C1),Shee
t1!C1:C100)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Back
Top