+ Reply to Thread
Results 1 to 6 of 6

Sum Countif formula but ignore duplicates

  1. #1
    Registered User
    Join Date
    01-11-2012
    Location
    St Ives, Cambs
    MS-Off Ver
    Excel 2000
    Posts
    6

    Sum Countif formula but ignore duplicates

    Hello everyone,
    I found a good formula on this site a while ago:
    =SUM(COUNTIF(B5:G5,NUMBERS)) cse

    but I'd like to know if it's possible for this formula to ignore duplicates.

    It's a sheet for Lottery - B5:G5 are the 6 numbers chosen, and the NUMBERS is a named range of lines where we key in the actual lotto numbers each week. It counts how many of your numbers have come out.
    Since there can be multiples of the same numbers week on week for the lottery, this formula counts those duplicates, but I'm hoping someone can help with amending this formula to ignore them and only count unique entries.

    Thanks
    Last edited by TiLa; 01-12-2012 at 04:13 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Sum Countif formula but ignore duplicates

    Can you upload example workbook?

  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 Countif formula but ignore duplicates

    Try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER
    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
    Registered User
    Join Date
    01-11-2012
    Location
    St Ives, Cambs
    MS-Off Ver
    Excel 2000
    Posts
    6

    Re: Sum Countif formula but ignore duplicates

    I have attached an example sheet.
    Basically I just want to count the Green Cells - also tried to find a CountColor formula but I think my works version of Excel is too old for that, and I'm not experienced in VB at all either so maybe I was also doing some thing funny!

    Tried the Count / Frequency formula but that didn't seem to work.
    Attached Files Attached Files
    Last edited by TiLa; 01-12-2012 at 02:21 AM.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Sum Countif formula but ignore duplicates

    Quote Originally Posted by TiLa View Post
    I have attached an example sheet.
    Basically I just want to count the Green Cells - also tried to find a CountColor formula but I think my works version of Excel is too old for that, and I'm not experienced in VB at all either so maybe I was also doing some thing funny!

    Tried the Count / Frequency formula but that didn't seem to work.
    @TiLa
    You should create a helper area for Numbers where the data ignore duplicates.
    Ex: K9:P11
    In K9:
    Please Login or Register  to view this content.
    Copy down and across to fill K9:P11.
    The name NUMBERS should be edited to helper area
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-11-2012
    Location
    St Ives, Cambs
    MS-Off Ver
    Excel 2000
    Posts
    6

    Re: Sum Countif formula but ignore duplicates

    Thanks very much bebo, that worked perfectly.
    V interesting formula btw - I'll keep that on my list of cool formulas

+ 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