+ Reply to Thread
Results 1 to 3 of 3

How to dynamically denote unique records in filtered range or table?

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    BC, Canada
    MS-Off Ver
    Excel 2016
    Posts
    20

    How to dynamically denote unique records in filtered range or table?

    Hey everyone, I'm using a desktop or enterprise server version of Excel 2016 so i don't have access to some of the newer functions like UNIQUE or XLOOKUP. I'm trying to find a dynamic array formula (sorry if that's not the right terminology) like AGGREGATE or SUBTOTAL that will automatically recalculate when my table is filtered to identify unique or distinct records. I've done a lot of searching and tried several different formula variations, but haven't been able to get the "dynamic" piece figured out...

    In the example below, i have a table that contains duplicate neigh values. I can use this formula; =IF(COUNTIF($A$2:$A5,$A2)=1,"Distinct","") to identify distinct rows in the table, but I would like it to recalculate when I filter the table down by another column like the AGGREGATE function does when you select the option to ignore hidden rows and errors...

    In my distinct column I'm currently using this formula =IF(COUNTIF($A$2:$A5,$A2)=1,"Distinct",""), I've tried using CTRL-Shift-Enter to make it an array formula as well as several other variations using SUMPRODUCT and AGGREGATE with the SMALL function, but haven't been able to achieve the desired result, which would be that if i filtered the Project Type column in the table to exclude ABC, the Distinct column would recalculate to display the value 'Distinct' in the next visible row for Neigh 001 (Project Type EFG)...

    Neigh Code Project Type Distinct?
    001 ABC Distinct
    001 EFG
    001 HIJ
    002 ABC Distinct


    Desired result when table is filtered to exclude Project Type ABC: (the next visible record for Neigh Code 001 becomes the Distinct record...)

    Neigh Code Project Type Distinct?
    001 EFG Distinct
    001 HIJ

    The ultimate goal is to be able to filter the table to the desired result set and then apply the filter to the 'Distinct' column to further reduce that set down to only distinct Neigh Code records.

    Any help would be greatly appreciated!

    Thanks!
    Last edited by jbaich; 10-25-2023 at 04:54 PM. Reason: solved

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How to dynamically denote unique records in filtered range or table?

    1. Please update your profile.

    2. D2, copied down:

    =AGGREGATE(3,7,A2)


    E2 copied down:
    =IF(COUNTIFS(A$2:A2,A2,D$2:D2,1)=1,"Distinct","")

    Now apply your filter.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    11-02-2011
    Location
    BC, Canada
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: How to dynamically denote unique records in filtered range or table?

    Works like a charm! Thanks so much!!!

+ 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. Return a filtered unique records without no blanks and duplicates.
    By Mohammad Munawar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-21-2020, 04:09 AM
  2. [SOLVED] Can't filter "Unique" records from Filtered range
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2018, 04:10 PM
  3. [SOLVED] Filtered records in listbox from table
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2018, 11:53 AM
  4. [SOLVED] Count Unique Filtered Records
    By BobZZ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2018, 04:42 PM
  5. Excel 2007 - count unique records in Filtered Table
    By redbrad0 in forum Excel General
    Replies: 0
    Last Post: 05-26-2010, 08:20 PM
  6. Count unique records in a filtered range
    By jiminic in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-24-2009, 02:44 AM
  7. Create new excel table with filtered records from another table
    By Berne van de Laar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-02-2006, 07:20 PM

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