+ Reply to Thread
Results 1 to 4 of 4

COUNTIF with Time and Name Criteria

  1. #1
    Registered User
    Join Date
    01-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    27

    COUNTIF with Time and Name Criteria

    Hi,

    In column G I have a range of times in the format 12:04:44 AM. Beside it I have a series of names EG:

    12:05:54 AM Boss
    12:09:10 AM Boss
    12:04:32 AM Jet
    12:08:27 AM Jet
    12:03:41 AM Liam
    12:09:10 AM Boss
    12:03:41 AM Liam
    12:04:45 AM Liam
    12:05:45 AM Liam
    12:05:14 AM Liam


    I'm using the COUNTIF formula to tell me how many entries in G are equal to or greater than 12:04:44 AM for Liam.

    I've tried both COUNTIF and SUMPRODUCT. Any ideas?

    Thanks

    J.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: COUNTIF with Time and Name Criteria

    =SUMPRODUCT(--(A1:A10>=TIMEVALUE("12:04:44 am")),--(B1:B10="liam"))
    or just put time in a cell say E1 and liam in a cell say e2

    =SUMPRODUCT(--(A1:A10>=E1),--(B1:B10=E2))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    01-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: COUNTIF with Time and Name Criteria

    Hi,

    The 2nd formula worked for the most part, however a few values end up being missed.

    EG:

    12:03:30 AM Boss
    12:03:50 AM Boss
    12:05:09 AM Boss
    12:04:29 AM Boss
    12:04:25 AM Boss
    12:05:48 AM Boss
    12:05:37 AM Boss
    12:03:09 AM Boss
    12:05:33 AM Boss
    12:05:37 AM Boss
    12:06:03 AM Boss
    12:04:02 AM Boss
    12:07:17 AM Boss
    12:05:54 AM Boss
    12:09:10 AM Boss

    Using the =SUMPRODUCT(--(A1:A10>=E1),--(B1:B10=E2)) example, I received returns. However, instead of receiving 9, it only returned 8 as having met the criteria.

    Thoughts?

    Thanks,

    J.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: COUNTIF with Time and Name Criteria

    Is your range long enough?
    =SUMPRODUCT(--(A1:A15>=E1),--(B1:B15=E2)) returns 9 if using e1=12:04:44 AM
    and e2=boss

+ 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.6.0 RC 1