how to check if date falls within range

B

Bharat Saboo

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
 
B

Bharat Saboo

Kindly note that the start and the end dates are also in a range of cells in
sheet1
 
B

Biff

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
 
B

Bob Phillips

=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

Top