+ Reply to Thread
Results 1 to 5 of 5

Unique entries, keeping only one with a labelled word

  1. #1
    Registered User
    Join Date
    01-03-2022
    Location
    DK
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    11

    Unique entries, keeping only one with a labelled word

    Hello

    I'm stuck on the problem below.

    I have a dataset that I would like to categorise and filter. In this process I want to (1) remove cells that are not unique, (2) remove cells that contain a specific word from a list, and (3) keep one of those uniques, even though it contains a word from said list.

    The idea is, that I will be able to lable entries, ex. "She eats Orange" with "Orange", and an entry like "She eats Orange 12345" wont show up.
    If I get new raw data (ex. "The grass is green" and "The grass is green 1234", both should show up, until I label one ex. "Green".


    The attached excel document is an attempt to show the desired result.


    Thanks
    Jonas / Jazzzz

  2. #2
    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 entries, keeping only one with a labelled word

    Withdrawn by FR.
    Dave

  3. #3
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Unique entries, keeping only one with a labelled word

    If you don't mind to use helper columns, please try.

    Uniq-check
    B6
    =IF(COUNTIF($A$5:$A$15,A6)=1,1,IF(COUNTIF(A$5:A6,A6)=1,1,0))

    Labeled check
    C6
    =IFERROR(INDEX(H:H,AGGREGATE(15,6,ROW($H$5:$H$15)/(1/(($H$5:$H$15 < > "")*(FIND(LOWER($H$5:$H$15),LOWER(A6)) > 0))),1)),0)

    First of each label
    D6
    =IF(C6 < > 0,IF(COUNTIF(C$5:C6,C6)=1,1,0),B6)

    Selection check
    E6
    =IF(D6=1,MAX(E$5:E5)+1,0)

    Output
    F6
    =IF(ROWS(F$5:F5) < =MAX($E$5:$E$15),INDEX($A$5:$A$15,MATCH(ROWS(F$5:F5),$E$5:$E$15,0)),"")

    Note : Data range from row 5 to 15

    Regards.
    Last edited by menem; 01-04-2022 at 10:17 PM. Reason: add forgot relation of uniq and 1st label

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Unique entries, keeping only one with a labelled word

    Using similar logic as @menen, but using some 365 formulas, this uses 2 Helper columns:
    1st, in cell B6, then copied down:
    =IFERROR(FILTER($F$6:$F$8,ISNUMBER(SEARCH($F$6:$F$8,A6))),0)

    then in C6 and copied down:
    =IF(B6=0,1,COUNTIFS(B$6:B6,B6))

    Finally in D6 (don't copy down because this is an array formula)
    =FILTER(A6:A14,C6:C14=1)

    (see attached)

  5. #5
    Registered User
    Join Date
    01-03-2022
    Location
    DK
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    11

    Re: Unique entries, keeping only one with a labelled word

    Thanks a lot. Both solutions worked as they should

    Thanks
    Jonas / Jazzzz

+ 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. Generating a unique list of entries but removing some entries.
    By Kramxel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-14-2015, 11:42 AM
  2. Replies: 1
    Last Post: 01-29-2015, 04:08 PM
  3. Removing entries using Selection.Autofilter, but keeping the greatest 100 entries?
    By artenry in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2014, 03:51 PM
  4. Unique entries / new entries against historic data
    By Leopold2000 in forum Excel General
    Replies: 1
    Last Post: 09-16-2013, 06:24 PM
  5. Replies: 7
    Last Post: 05-11-2012, 02:00 PM
  6. Using VBA: I have a list with multiple entries.Need to reduce down to unique entries
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-25-2011, 03:19 PM
  7. Duplicate Entries into List of Unique Entries
    By MjRmatt in forum Excel General
    Replies: 1
    Last Post: 08-18-2010, 11:53 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