+ Reply to Thread
Results 1 to 4 of 4

How to count entries based on two columns (example shown)

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    7

    How to count entries based on two columns (example shown)

    In column D, I want to print the counts in column D, based on entries in column A(Name) and column C(Num). How can I achieve it as one liner in excel? SUMPRODUCT or COUNTIF?

    Name ID Num COUNT
    Control C 260 2
    Control C 260 2
    Test C 260 2
    Test C 260 2
    Control C 261 3
    Control C 261 3
    Control C 261 3
    Test C 261 2
    Test C 261 2
    Control C 262 3
    Control C 262 3
    Control C 262 3
    Test C 262 3
    Test C 262 3
    Test C 262 3

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: How to count entries based on two columns (example shown)

    try this, copied down...
    =SUMPRODUCT(($A$2:$A$16=A2)*($C$2:$C$16=C2))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-26-2013
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to count entries based on two columns (example shown)

    Amazing! Thanks so much!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: How to count entries based on two columns (example shown)

    Happy to help. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

+ 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