+ Reply to Thread
Results 1 to 6 of 6

CountIF - Sum of "Bob" and "James" in 1 cell

  1. #1
    Registered User
    Join Date
    05-11-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2010
    Posts
    65

    CountIF - Sum of "Bob" and "James" in 1 cell

    I have a countif on a number of names to be displayed in a cell i.e. =COUNTIF('Summary Matrix'!$K$3:$K$8,"James")

    James = 10
    Bob = 14
    etc

    I would like to do a count on 3 names in one cell. I.e. 10 instances of James + the 14 instances of Bob the cell would display 24.

    However, I can't figure out how to do this. Anyone know?

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: CountIF - Sum of "Bob" and "James" in 1 cell

    depends on your version of excel and what your sheet looks like (easier to upload a book)

    but you could just

    Please Login or Register  to view this content.
    or use sumproduct

    obviosly alter your ranges to suit
    Last edited by twiggywales; 09-13-2012 at 06:25 AM.
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: CountIF - Sum of "Bob" and "James" in 1 cell

    sumproduct would be this for james and bob (take out the @ symbol see further in post for that)

    Please Login or Register  to view this content.
    then add

    Please Login or Register  to view this content.
    where i put the @ symbol per name

  4. #4
    Registered User
    Join Date
    05-11-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2010
    Posts
    65

    Re: CountIF - Sum of "Bob" and "James" in 1 cell

    twiggywales,
    Thanks that works like a charm. A follow up question though. I am dividing the names by the total number of records to give a %.

    e.g. =COUNTIF('Summary Matrix'!$K$3:$K$8,"James")/957

    /957 is the total number of names in the system

    With additional CountIF statements this seems to be going a bit stange. If I remove the /957 I get the correct total count of the names. Do you know how I can convert this to a % ?

  5. #5
    Registered User
    Join Date
    08-10-2012
    Location
    Rotterdam, Holland
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: CountIF - Sum of "Bob" and "James" in 1 cell

    Put the countifs between brackets. Like this: (Countif1+Countif2)

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: CountIF - Sum of "Bob" and "James" in 1 cell

    =SUM(COUNTIF('Summary Matrix'!$K$3:$K$8,{"James","Bob","Ted}))/957
    for instance
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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