+ Reply to Thread
Results 1 to 5 of 5

Unique count based on year excluding duplicate values from previous years

  1. #1
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Unique count based on year excluding duplicate values from previous years

    Good evening all.

    I got stuck in this query from a Brazilian forum.
    I'd appreciate your help to count unique values in column C, based on year in column D.
    The difficulty is to exclude those values that have already been counted in previous years.

    I managed to pull this out using a helper column to mark out duplicates from previous years, but to do it right, I had to sort data down by year.
    The author says he can't use that solution.

    In file attached, I list 4 different formulas, which I tried to tackle to work as desired to no avail.

    Either formula or VBA solution is welcome.
    Thanks in advance to anyone who will give it a try.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Unique count based on year excluding duplicate values from previous years

    Hi Estevaoba,

    Here is what gives your answer.
    1. sort your table by year - small to large
    2. create a helper column that counts the occurrence of the Scientific Name
    3. create a pivot table and filter by the count helper
    4. Show the running total by year.
    See the attached for the answer.
    Countifs no duplicates Pivot Run Total.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Unique count based on year excluding duplicate values from previous years

    If you would still like a unique counts formula this returns your expected counts (as shown in G9:M9).

    You may have to array enter this formula in Excel 2016.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter. In cell G5 and filled across
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Unique count based on year excluding duplicate values from previous years

    Wow! That is awesome, Dave! Thanks a lot!
    I knew there had to be some way to get around it. You're the best.

    Thank you also, MarvinP.

    God bless you all.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Unique count based on year excluding duplicate values from previous years

    You are welcome. Glad it helped. Thank you for the feedback, added rep and marking your thread Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count duplicate text values in columns whilst ignoring/excluding certain values
    By adamwestwell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-02-2017, 05:34 AM
  2. Replies: 6
    Last Post: 01-13-2017, 01:49 PM
  3. [SOLVED] Counting unique cells - totally excluding duplicate values
    By ChanceLipscomb in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-26-2016, 12:44 PM
  4. [SOLVED] Find count of Unique or Duplicate Values based on Concatenated values in 2 columns
    By bdicarlo1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2014, 12:42 AM
  5. Replies: 1
    Last Post: 03-03-2014, 11:06 AM
  6. Excluding certain values & prefixes from unique count
    By Bob McCusker in forum Excel General
    Replies: 2
    Last Post: 09-24-2010, 05:31 AM
  7. Excel COUNT function, excluding duplicate values
    By knightcloud in forum Excel General
    Replies: 2
    Last Post: 07-07-2010, 01:58 AM

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