How to count # of dates that fall between a start and end date.

A

ascottbag-hcm

Can someone help with a formula that will give a count in one worksheet of
hire dates that exist in one column of another worksheet. I have a second
worksheet (example below) that contains two criteria columns, one with month
start date, the other with month end date. I'm trying to get a count of all
dates from the first worksheet that would be >=the below start date AND <=
the below end date.

START OF MONTH END OF MONTH COUNT
4/1/2009 4/30/2009
 
O

OssieMac

You just subtract one date from the other and add 1. The resulting formula
cell must be formattd as a number; not a date.

Examples:-
If formula is on the same worksheet as source data
=B2-A2 +1

If formula is on a different worksheet to the source data
=Sheet1!B2-Sheet1!A2+1
 
J

Jacob Skaria

The below formula should work.

Sheet2 Column A contains all dates
Sheet1 A2 = StartDate
Sheet1 B2 = End Date

=SUMPRODUCT((Sheet2!A:A>=A2)*(Sheet2!A:A<=B2))

If this post helps click Yes
 
O

OssieMac

Ignore my previous answer. After seeing Jacob's answer I realize that I
initially totally miss understood the question.
 

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