0

I am already abel to extract unique values, in excel, from an array using this function:

{=INDEX(list,MATCH(0,COUNTIF(uniques,list),0))}

However, I want to specify certain values for excel not to return. Is there any way to specify values that I don't want to be found within the already specified "list"? The ideal outome would be something like this:

excel list example

I am also using excel version 2101.

Any information is helpful, thanks!

2
  • 2
    Yes, there is. And it is easier in O365 vs earlier versions of Excel. If you need help as to how to do it, I suggest you EDIT your question to include an example of your data (preferably as text that can be copy/pasted into a worksheet), along with your expected results. It might help to read How to create a Minimal, Complete, and Verifiable example. Also include the Excel version you are using, and whether it is Windows or MAC or Online Commented Feb 16, 2021 at 19:23
  • @RonRosenfeld Thanks for the info, I just made some edits. I couldn't copy and paste the data directly without creating an image link, but I hope this is still useful. Commented Feb 16, 2021 at 19:47

1 Answer 1

1

From your example, I ASSUME you want to exclude the lines starting with Round.

Try:

=LET(x,UNIQUE(List),FILTER(x,LEFT(x,5)<>"Round"))

or

=UNIQUE(FILTER(List,(LEFT(List,5)<>"Round")))

I'm not sure if it is more efficient to filter a smaller list, as is done in the first formula; or to avoid using LET as is done in the second formula.

EDIT

This can also be done using FILTERXML and TEXTJOIN which should be present in all Windows versions 2016+

=FILTERXML("<t><s>"&TEXTJOIN("</s><s>",,list)&"</s></t>","//s[not(starts-with(.,'Round')) and not(preceding-sibling::*=.)]")

the xPath

  • not(starts-with(.,'Round')) : should be obvious
  • Return only unique values:
    • and not(preceding-sibling::*=.) : do not return a node if any preceding-sibling matches the current node being tested
Sign up to request clarification or add additional context in comments.

4 Comments

Sadly my build of Excel does not include either LET or FILTER. I'm using build 13628.20380 Maybe there is an add-on that I am missing?
@ChapinCheney At "About Excel" mine says Version 2101 (Build 13628.20380 Click-to-Run) Current Channel. If I click "About Excel", it then shows Microsoft Excel for Microsoft 365 MSO (16.0.13628.20128) 32-bit Perhaps you have an Enterprise version which hasn't been brought up to date yet?
@ChapinCheney See my edit for a formula version not using LET or FILTER or UNIQUE
Thanks so much, this worked perfectly. Took a little playing around to understand completely, but honestly thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.