+ Reply to Thread
Results 1 to 8 of 8

Sum of two counts

  1. #1
    Registered User
    Join Date
    03-17-2004
    Posts
    28

    Sum of two counts

    hello,

    i'm having difficulty with this formula. in column L i have a list of identification numbers including some multiples. in column F is "yes" or "no" depending. i'm trying to create a summary of how many No's appear for each identification number on a different sheet. i hope this is enough information, let me know if i need to elaborate more.


    Thanks,

  2. #2
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Sum of two counts

    Can you post a sample worksheet? sounds like you need a Countif formula.
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum of two counts

    Have a try with Pivot tables:

    http://peltiertech.com/Excel/Pivots/pivotstart.htm
    Where there is a will there are many ways.

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

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

  4. #4
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Sum of two counts

    Hi N - Ive been trying to work out how to do this without a PT just for my own benefit. It looks like a blend of sumif and countif!
    please could you put me out of my misery!

    thanks alot.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum of two counts

    See attached.

    Just drag Id and Yes/No columns to Row Area

    Then drag Yes/No columns also to Data Area (this should give Count of Yes/No)

    You can then filter the Yes/No Row area column to show only the No counts.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Sum of two counts

    Hi N, sorry if I was not clear in my post... what I meant to say was, ive been trying to work out how to do it WITHOUT using a PT, ie, with a formula.

    Sorry for not being clear. Thanks alot mate

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum of two counts

    Sorry, it was my fault. I misread your post.

    See attached.

    I added a helper column to find uniques...

    In C2:

    =IF(COUNTIF(A$2:A2,A2)=1,COUNT(C$1:C1)+1,"")

    copied down

    then in D2:

    =MAX(C:C) to get total count

    Then to list the unique ids:

    In H2, I entered":

    =IF(ROWS($A$1:$A1)>$D$2,"",INDEX($A$2:$A$19,MATCH(ROWS($A$1:$A1),$C$2:$C$19)))

    copied down

    and in I2 to count the "No" entries:

    =IF(H2="","",SUMPRODUCT(--($A$2:$A$19=H2),--($B$2:$B$19="NO")))

    if you have 2007

    =IF(H2="","",COUNTIFS($A$2:$A$19,H2,$B$2:$B$19,"NO"))
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Sum of two counts

    brilliant. thanks alot.

+ 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