Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How to count # of dates that fall between a start and end date.

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default How to count # of dates that fall between a start and end date.

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

--
Regards,

OssieMac


"ascottbag-hcm" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default How to count # of dates that fall between a start and end date.

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
---------------
Jacob Skaria


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default How to count # of dates that fall between a start and end date

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

--
Regards,

OssieMac


"OssieMac" wrote:

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

--
Regards,

OssieMac


"ascottbag-hcm" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DAYS360 where Start Date is Static and End Date is Latter of Two Dates Aimee Shaw Excel Discussion (Misc queries) 1 December 28th 09 10:34 PM
I want to count days between two dates including start date Infinitebiscuit Excel Worksheet Functions 2 February 20th 07 12:27 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
how would I count dates (not # of days) in cells that fall betwee. sailingscotts Excel Worksheet Functions 3 August 16th 05 04:29 AM
expanding a start date and end date to show all the dates in a list musicman[_2_] Excel Programming 0 July 20th 05 08:47 PM


All times are GMT +1. The time now is 06:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"