+ Reply to Thread
Results 1 to 9 of 9

Extract a unique list that ignores a specific value

  1. #1
    Registered User
    Join Date
    04-25-2014
    Location
    california
    MS-Off Ver
    Excel 2007
    Posts
    4

    Extract a unique list that ignores a specific value

    Hello all,

    This is my first post (hooray!). I have an array formula that extracts a unique list from another column; however, I would like to ignore a specific value and it not populate the cell. For instance:

    D
    10| XXXXXXXX406
    11| XXXXXXXX400
    12| Lunch
    13| XXXXXXXX933
    14| XXXXXXXX400

    K
    10|
    11| XXXXXXXX406
    12| XXXXXXXX400
    13| XXXXXXXX933
    14|


    The array formula I have in cell K11 is as follows:

    =IF(IFERROR(INDEX($D$10:$D$25,MATCH(0,COUNTIF($K$10:K10,$D$10:$D$25),0)),"")=0,"",IFERROR(INDEX($D$10:$D$25,MATCH(0,COUNTIF($K$10:K10,$D$10:$D$25),0)),""))

    If D10:D25 has a value of "Lunch", I would like it to be excluded. I have tried to use the IF function to accomplish this, and it kind of works. However, any values in cells below the instance of "Lunch" is also excluded. For instance:

    D
    10| XXXXXXXX406
    11| XXXXXXXX400
    12| Lunch
    13| XXXXXXXX933
    14| XXXXXXXX400

    K
    10|
    11| XXXXXXXX406
    12| XXXXXXXX400
    13|
    14|

    I would like to keep the cell empty if there is no new unique cells, and "Lunch" is excluded.

    Thank you in advance for all of your help. I look forward to seeing what the bunch of smart people on this forum comes up with.

    Cheers,
    Mateo315
    Last edited by mateo315; 12-17-2015 at 07:07 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: Extract a unique list that ignores a specific value

    Attaching a sample workbook enables others to work on your problem:

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    To add a file to a new post

    To add a file to an existing post.

  3. #3
    Registered User
    Join Date
    04-25-2014
    Location
    california
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract a unique list that ignores a specific value

    I have attached a sample of the worksheet. Thank you very much for your help.
    Last edited by mateo315; 12-21-2015 at 11:46 AM.

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

    Re: Extract a unique list that ignores a specific value

    I couldn't see anything in D and K of your attached sheet; so I went back to post 1.

    I'm not sure; but is this what you wanted in K10, copied down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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

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

    Re: Extract a unique list that ignores a specific value

    ...I just noted that you may not want the answer alphabetically sorted (which the first solution does). This array formula will leave the unque non-Lunch codes in their orignal order:

    =IFERROR(INDEX($D$10:$D$14,MATCH(0,INDEX(IF($D$10:$D$14<>"Lunch",COUNTIF($L$9:$L9,$D$10:$D$14)),0),0)),"")

  6. #6
    Registered User
    Join Date
    04-25-2014
    Location
    california
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract a unique list that ignores a specific value

    Through more tinkering, I was able to accomplish what I was looking for with the following formula:

    =IF(IFERROR(INDEX($D$10:$D$25,MATCH(0,IF($D$10:$D$25="Lunch",1,COUNTIF(K$10:$K10,$D$10:$D$25)),0)),"")=0,"",IFERROR(INDEX($D$10:$D$25,MATCH(0,IF($D$10:$D$25="Lunch",1,COUNTIF(K$10:$K10,$D$10:$D$25)),0)),""))

    Thank you very much for your help!!!

  7. #7
    Registered User
    Join Date
    04-25-2014
    Location
    california
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract a unique list that ignores a specific value

    It looks as though we came to a very similar conclusion.

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

    Re: Extract a unique list that ignores a specific value

    Great! I'm glad to have helped! If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  9. #9
    Forum Contributor
    Join Date
    12-23-2003
    Posts
    179

    Re: Extract a unique list that ignores a specific value

    In K10 control+shift+enter, not just enter, and copy down:

    =IFERROR(INDEX(Data,SMALL(IF(FREQUENCY(IF(1-(Data=""),IF(1-(Data="Lunch"),
    MATCH(Data,Data,0))),Ivec),Ivec),ROWS($K$10:K10))),"")

    where D10:D14 >> Data and ROW(Data)-ROW(INDEX(Data,1,1))+1 >> Ivec.

+ 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. How to extract unique value within a specific period of time
    By darwisku in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-23-2014, 08:37 AM
  2. Extract unique list from column
    By lamdl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-25-2014, 05:17 AM
  3. [SOLVED] automatically extract unique values from a list
    By labogola in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-07-2014, 10:54 AM
  4. Extract unique dates from a list through formula only
    By maniknandi in forum Excel General
    Replies: 7
    Last Post: 07-29-2013, 02:48 AM
  5. Extract unique numbers from a list
    By excelbee in forum Excel General
    Replies: 7
    Last Post: 08-11-2012, 09:00 AM
  6. [SOLVED] Extract an unique list from 2 different lists without duplicates
    By akalien in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-06-2012, 06:09 AM
  7. Extract Data From a list with unique value
    By sunflowers in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-22-2011, 08:47 PM

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