+ Reply to Thread
Results 1 to 3 of 3

Thread: Trying to count the amount of times a certain date falls between a range for a specif

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    3

    Trying to count the amount of times a certain date falls between a range for a specif

    Hello, I have a situation here where I have Sheet 1 and in column A where I have multiple names of individuals (Ex A2 Tom Jones, A3 Bob Villa). On Sheet 2 I also have the names of these individuals followed by multiple days that they took off in a given year (ex. A2 Tom Jones, B2 7/1/2011, C2 7/23/2011). I would like to find a formula that would count the number of times an individual has a date listed between a certain range. I have tried a countif and also a sum product and neither have worked. Here are the formulas I have used so far and they were typed on Sheet 1 (O1 and P1 have the dates 7/1/2011 and 7/31/2011 respectively):
    =COUNTIFS(A2,Sheet2!A1:BB53,Sheet2!A1:BB53,">="&O1,Sheet2!A1:BB53,"<="&P1) -- I need to have the Ranges on Sheet2 portion of the formula because Tom Jones will now necessarily be in the same row on Sheet1 and Sheet2
    =SUMPRODUCT((Sheet2!A1:A35=A6),(Sheet2!B1:AJ35>=O1),(Sheet2!B1:AJ35<=P1))

    1.JPG2.JPG
    Last edited by NBVC; 01-10-2012 at 03:34 PM.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Trying to count the amount of times a certain date falls between a range for a sp

    Try:

    =SUMPRODUCT((Sheet2!A1:A35=A6)*(Sheet2!B1:AJ35>=O1)*(Sheet2!B1:AJ35<=P1))
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    01-10-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Trying to count the amount of times a certain date falls between a range for a sp

    It worked, thank you!
    Last edited by mhynson; 01-10-2012 at 03:10 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0