+ Reply to Thread
Results 1 to 13 of 13

Counting occurrences

  1. #1
    Registered User
    Join Date
    10-29-2010
    Location
    East Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Counting occurrences

    Column A3:A13 each cell has a date in it. Column B3:B13 has someones name in each cell. At B16:B26 I want it to validate each entry in column B3:B13 and if the adjacent date in column A3:A13 is later than todays system date then I want it to count the name in column B. The objective is to list everyones name in column A16:A26 and list in column B16:B26 a counting of how many times their name appeared in B3 thru B13 but only if the date has already gone by. I can't figure out what to put in each cell at B16:B26 to make it evaluate the date and count the B3:B13 cells. Does anyone know how I can do that?

  2. #2
    Registered User
    Join Date
    10-29-2010
    Location
    East Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Counting occurrences

    Column A3:A13 each cell has a date in it. Column B3:B13 has someones name in each cell. At B16:B26 I want it to validate each entry in column B3:B13 and if the adjacent date in column A3:A13 is later than todays system date then I want it to count the name in column B. The objective is to list everyones name in column A16:A26 and list in column B16:B26 a counting of how many times their name appeared in B3 thru B13 but only if the date has already gone by. I can't figure out what to put in each cell at B16:B26 to make it evaluate the date and count the B3:B13 cells. Does anyone know how I can do that?

  3. #3
    Forum Contributor bentleybob's Avatar
    Join Date
    02-27-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    644

    Re: Counting occurrences

    Maybe it's cheating, but I would create a third column that tested to see if the date in Column A in that row has already gone by. If so, it would pull the name from Column B; if not, it would be blank. Then you can easily do a COUNTIF using that column (which you can then hide).

  4. #4
    Forum Contributor bentleybob's Avatar
    Join Date
    02-27-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    644

    Re: Counting occurrences

    Better answer: =SUMPRODUCT((b$3:b$13="Bill")*(a$3:a$13<=today()))

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Counting occurrences

    A basic approach might be to use a helper column (Column C in this example), this column can be hidden.
    In C3
    Please Login or Register  to view this content.
    Drag/Fill Down to C13

    then in B16
    Please Login or Register  to view this content.
    Drag/Fill Down as required.

    Hope this helps
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Counting occurrences

    Or this without helper column:

    In C16 write:

    =SUMPRODUCT(--($A$3:$A$13<TODAY()),--($B$3:$B$13=A16))

    For XL2007 and latter it's better to use COUNTIFS formula thne SUMPRODUCT

    =COUNTIFS($A$3:$A$13, "<"&TODAY(), $B$3:$B$13, A16)

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting occurrences

    Guys, FWIW, this is a dupe thread - I did flag to Mods for locking earlier

    http://www.excelforum.com/excel-gene...currences.html

  8. #8
    Registered User
    Join Date
    10-29-2010
    Location
    East Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Counting occurrences

    Thank You! For two things 1)understanding my problem 2)coming up with a solution.
    You are a genius! This works wonderfully.
    Okay, here's another one for you. Now I want to count the times in B3:B13 that a date is actually entered and put that sum at B15, but only if the date is already past. If there is no date or the date hasn't come yet - it won't count it. I want to know how many occurrences of dates gone by that there are on that particular worksheet.

    --------------------------------------------------------------------------------
    Last edited by HaydenB; 10-30-2010 at 10:45 AM.

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Counting occurrences

    Thanks Don

    There might also be a communication problem with landlines.
    All Broadband failed, to my knowledge, in N. England, Scotland, & N. Ireland from about 19:00 yesterday until, BT claimed 08:00 today, my system wasn't restored until 11:30.
    The failure coincided with a double circuit trip on the east coast interconnector, how much more tripped after this I don't know yet, but I do know that Manchester was down.

  10. #10
    Registered User
    Join Date
    10-29-2010
    Location
    East Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Counting occurrences

    Okay, here's another one for you. Now I want to count the times in B3:B13 that a date is actually entered and put that sum at B15, but only if the date is already past. If there is no date or the date hasn't come yet - it won't count it. I want to know how many occurrences of dates gone by that there are on that particular worksheet.
    Last edited by HaydenB; 10-30-2010 at 10:15 AM.

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Counting occurrences

    Threads merged.

    Hayden, please take a few minutes to read the forum rules before posting again.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  12. #12
    Registered User
    Join Date
    10-29-2010
    Location
    East Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Counting occurrences

    Where do you find a "prefix" box?

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Counting occurrences

    From the forum rules:

    Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes.

+ 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