+ Reply to Thread
Results 1 to 7 of 7

[HELP] How to count each one ONLY once ?

  1. #1
    Registered User
    Join Date
    06-02-2012
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    95

    Question [HELP] How to count each one ONLY once ?

    I have the following Excel table:
    vr59h2.png

    I want to see how many numbers (not how many times) from the first row appear in the last two rows.

    I tried to sum each countif for each number from the first row in the range area of these last two rows.
    It doesn't work.

    If I try to countif for 40, as you see in image, it shows to me 2 because it appears two times: one on the row and the other on the last row. It should say to me only 1.
    Then if I try to do the same for every number in the first row it should give to me for each one of them 0 or 1. Just 0 or 1.
    Then, finally added all together in order to find out how many numbers (not how many times) from the first row appear in the last two rows.

    Help me, please.

    Thank you so much !

  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,946

    Re: [HELP] How to count each one ONLY once ?

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    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
    06-01-2013
    Location
    Columbus, ms
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: [HELP] How to count each one ONLY once ?

    If you only have 5 columns you could use a string of if statements
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: [HELP] How to count each one ONLY once ?

    Yeah, a sample file will help, and could you elaborate... is there only going to be three rows? Your image shows three rows, but it also appears to be a Table. A Table can be sorted and/or filtered. The last two rows being displayed may not be the last two rows in displayed when filtered. Sorting may change the first and last two rows. And then there's the question whether the result of this determination is going to be in the table or outside the table. Then there's also the question whether the data in the table is static or dynamic (i.e. brought into the table by formula referencing data outside the table.

    Need mo' info'

  5. #5
    Registered User
    Join Date
    06-02-2012
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: [HELP] How to count each one ONLY once ?

    Quote Originally Posted by Spitzerpl View Post
    If you only have 5 columns you could use a string of if statements
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks !
    Stars added. :D

  6. #6
    Registered User
    Join Date
    06-01-2013
    Location
    Columbus, ms
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: [HELP] How to count each one ONLY once ?

    Your welcome.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: [HELP] How to count each one ONLY once ?

    Not real clear.

    If you want to know how many ROWS contain at least one matching number from the first row...

    With your data in the range B2:G4...

    =SUMPRODUCT(--(MMULT(--ISNUMBER(MATCH(B3:G4,B2:G2,0)),{1;1;1;1;1;1})>0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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