+ Reply to Thread
Results 1 to 8 of 8

Count IF question

  1. #1
    Registered User
    Join Date
    10-30-2008
    Location
    NJ
    Posts
    5

    Count IF question

    Hello,
    I believe I would use a Count IF or/and Sum IF function for this question, but I am not sure and am new to excel. Thanks for your help.

    I have one long column filled with the names of people. I need to count the number of people that show up once and the people that show up more than once. So I am looking for any name that shows up more than once or just once and not the specific name of the person. I can use two different formulas for each result I am looking for.


    For instance(column):
    Patel
    Patel
    Patel
    Smith
    Myers
    Kaplan
    Jones
    Jones

    I need to come up with an answer that shows that 2 people have their names show up more than once and that 3 peoples names show up once.
    Last edited by VBA Noob; 11-03-2008 at 04:40 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Let's assume your names are in A1:A100

    Use this formula to give you a count of names that appear only once

    =SUMPRODUCT(--(COUNTIF(A1:A100,A1:A100)=1))

    and for a count of names that appear more than once

    =SUMPRODUCT(--(COUNTIF(A1:A100,A1:A100)>1)/COUNTIF(A1:A100,A1:A100&""))

  3. #3
    Registered User
    Join Date
    10-30-2008
    Location
    NJ
    Posts
    5
    Hello,

    When use the data above:
    Patel
    Patel
    Patel
    Smith
    Myers
    Kaplan
    Jones
    Jones

    1. The first formula for the number of names that appears once =SUMPRODUCT(--(COUNTIF(A1:A100,A1:A100)=1))
    gives me an answer of 4. I am looking for an answer of 3 ie three peoples names show up once.

    2. The second formula works. Thanks!

  4. #4
    Forum Contributor
    Join Date
    07-24-2008
    Location
    Athome
    MS-Off Ver
    Excel 2013
    Posts
    127
    Quote Originally Posted by uniqueimportsm6 View Post
    Hello,


    1. The first formula for the number of names that appears once =SUMPRODUCT(--(COUNTIF(A1:A100,A1:A100)=1))
    gives me an answer of 4. I am looking for an answer of 3 ie three peoples names show up once.
    if you have a heading in the column, then the formula might be including that item in the answer?

  5. #5
    Registered User
    Join Date
    10-30-2008
    Location
    NJ
    Posts
    5
    Quote Originally Posted by rasonline View Post
    if you have a heading in the column, then the formula might be including that item in the answer?
    I took the actual information above and tested in excel without headings and this is the answer I keep getting.

  6. #6
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    I get 3. Try using the Len() formula on these names. Maybe you have an extra space after one of them or something.

  7. #7
    Registered User
    Join Date
    10-30-2008
    Location
    NJ
    Posts
    5
    Quote Originally Posted by darkyam View Post
    I get 3. Try using the Len() formula on these names. Maybe you have an extra space after one of them or something.
    Your right I just did it again in a new sheet and I am getting the right answer. I think it could have been an extra space. Thanks

  8. #8
    Registered User
    Join Date
    10-30-2008
    Location
    NJ
    Posts
    5
    SOLVED.. thanks a lot for your guys help.

+ 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