Ga naar hoofdinhoud

Hoe unieke waarden extraheren op basis van criteria in Excel?

Stel dat u het linkergegevensbereik heeft dat u alleen de unieke namen van kolom B wilt weergeven op basis van een specifiek criterium van kolom A om het resultaat te krijgen zoals hieronder wordt getoond. Hoe kunt u deze taak snel en gemakkelijk in Excel afhandelen?

Extraheer unieke waarden op basis van criteria met matrixformule

Extraheer unieke waarden op basis van meerdere criteria met matrixformule

Extraheer unieke waarden uit een lijst met cellen met een handige functie

 

Extraheer unieke waarden op basis van criteria met matrixformule

Om deze taak op te lossen, kunt u een complexe matrixformule toepassen, doe dit als volgt:

1. Voer de onderstaande formule in een lege cel in waarin u het extractieresultaat wilt weergeven, in dit voorbeeld plaats ik het in cel E2 en druk vervolgens op Shift+Ctrl+Enter sleutels om de eerste unieke waarde te krijgen.

=IFERROR(INDEX($B$2:$B$15, MATCH(0, IF($D$2=$A$2:$A$15, COUNTIF($E$1:$E1, $B$2:$B$15), ""), 0)),"")

2. Sleep vervolgens de vulgreep naar de cellen totdat lege cellen worden weergegeven en nu zijn alle unieke waarden op basis van het specifieke criterium vermeld, zie screenshot:

Opmerking: In de bovenstaande formule: B2: B15 is het kolombereik dat de unieke waarden bevat waaruit u wilt extraheren, A2: A15 is de kolom het criterium bevat waarop u bent gebaseerd, D2 geeft het criterium aan waarop u de unieke waarden wilt weergeven op basis van, en E1 is de cel boven uw ingevoerde formule.

Extraheer unieke waarden op basis van meerdere criteria met matrixformule

Als u de unieke waarden wilt extraheren op basis van twee voorwaarden, is hier een andere matrixformule die u een plezier kan doen, doe dit als volgt:

1. Voer de onderstaande formule in een lege cel in waarin u de unieke waarden wilt weergeven, in dit voorbeeld plaats ik deze in cel G2 en druk vervolgens op Shift+Ctrl+Enter sleutels om de eerste unieke waarde te krijgen.

=IFERROR(INDEX($C$2:$C$15,MATCH(0,COUNTIF(G1:$G$1,$C$2:$C$15)+IF($A$2:$A$15<>$E$2,1,0)+IF($B$2:$B$15<>$F$2,1,0),0)),"")

2. Sleep vervolgens de vulgreep naar de cellen totdat lege cellen worden weergegeven en nu zijn alle unieke waarden op basis van de specifieke twee voorwaarden vermeld, zie screenshot:

Opmerking: In de bovenstaande formule: C2: C15 is het kolombereik dat de unieke waarden bevat waaruit u wilt extraheren, A2: A15 en E2 zijn het eerste bereik met de criteria waarop u unieke waarden wilt extraheren op basis van, B2: B15 en F2 zijn het tweede bereik met de criteria waarop u unieke waarden wilt extraheren op basis van, en G1 is de cel boven uw ingevoerde formule.

Extraheer unieke waarden uit een lijst met cellen met een handige functie

Soms wil je gewoon de unieke waarden uit een lijst met cellen extraheren, hier zal ik een handig hulpmiddel aanbevelen-Kutools for Excel, Met Extraheer cellen met unieke waarden (inclusief het eerste duplicaat) hulpprogramma, kunt u snel de unieke waarden extraheren.

Opmerking:Om dit toe te passen Extraheer cellen met unieke waarden (inclusief het eerste duplicaat), ten eerste moet u het Kutools for Excelen pas de functie vervolgens snel en gemakkelijk toe.

Na het installeren van Kutools for Excel, doe dit als volgt:

1. Klik op een cel waar u het resultaat wilt uitvoeren. (Note: Klik niet op een cel in de eerste rij.)

2. Dan klikken Kutools > Formule Helper > Formule Helper, zie screenshot:

3. In de Formules Helper dialoogvenster, voer dan de volgende bewerkingen uit:

  • kies Tekst optie van de Formule Type  keuzelijst;
  • Kies dan Extraheer cellen met unieke waarden (inclusief het eerste duplicaat) van het Kies een fromula keuzelijst;
  • Rechts Argumenten ingevoerd Selecteer een lijst met cellen waarvan u unieke waarden wilt extraheren.

4. Dan klikken Ok knop, wordt het eerste resultaat weergegeven in de cel, selecteer vervolgens de cel en sleep de vulgreep naar de cellen waarvan u alle unieke waarden wilt weergeven totdat lege cellen worden weergegeven, zie screenshot:

Gratis download Kutools voor Excel nu!


Meer relatieve artikelen:

  • Tel het aantal unieke en onderscheidende waarden uit een lijst
  • Stel dat u een lange lijst met waarden heeft met enkele dubbele items, nu wilt u het aantal unieke waarden tellen (de waarden die slechts één keer in de lijst voorkomen) of verschillende waarden (allemaal verschillende waarden in de lijst, het betekent uniek waarden + 1e dubbele waarden) in een kolom zoals het linker screenshot wordt getoond. In dit artikel zal ik het hebben over hoe ik deze taak in Excel kan aanpakken.
  • Som unieke waarden op op basis van criteria in Excel
  • Ik heb bijvoorbeeld een gegevensbereik dat de kolommen Naam en Bestelling bevat, nu om alleen unieke waarden in de kolom Bestelling op te tellen op basis van de kolom Naam, zoals in het volgende screenshot. Hoe los ik deze taak snel en gemakkelijk op in Excel?
  • Voeg unieke waarden samen in Excel
  • Als ik een lange lijst met waarden heb die gevuld is met enkele dubbele gegevens, wil ik nu alleen de unieke waarden vinden en ze vervolgens samenvoegen tot een enkele cel. Hoe kan ik dit probleem snel en gemakkelijk in Excel oplossen?

Beste Office-productiviteitstools

🤖 Kutools AI-assistent: Een revolutie teweegbrengen in de data-analyse op basis van: Intelligente uitvoering   |  Genereer code  |  Aangepaste formules maken  |  Analyseer gegevens en genereer grafieken  |  Roep Kutools-functies aan...
Populaire functies: Zoek, markeer of identificeer duplicaten   |  Verwijder lege rijen   |  Combineer kolommen of cellen zonder gegevens te verliezen   |   Ronde zonder formule ...
Super opzoeken: Meerdere criteria VLookup    VLookup met meerdere waarden  |   VOpzoeken over meerdere bladen   |   Fuzzy opzoeken ....
Geavanceerde vervolgkeuzelijst: Maak snel een vervolgkeuzelijst   |  Afhankelijke vervolgkeuzelijst   |  Multi-select vervolgkeuzelijst ....
Kolom Beheerder: Voeg een specifiek aantal kolommen toe  |  Kolommen verplaatsen  |  Schakel de zichtbaarheidsstatus van verborgen kolommen in  |  Vergelijk bereiken en kolommen ...
Uitgelichte functies: Raster focus   |  Ontwerpweergave   |   Grote formulebalk    Werkmap- en bladbeheer   |  resource Library (Auto-tekst)   |  Datumkiezer   |  Combineer werkbladen   |  Cellen coderen/decoderen    Stuur e-mails per lijst   |  Super filter   |   Speciaal filter (filter vet/cursief/doorhalen...) ...
Top 15 gereedschapsets12 Tekst Tools (toe te voegen tekst, Tekens verwijderen, ...)   |   50+ tabel Types (Gantt Chart, ...)   |   40+ Praktisch Formules (Bereken leeftijd op basis van verjaardag, ...)   |   19 Invoeging Tools (QR-code invoegen, Afbeelding invoegen vanaf pad, ...)   |   12 Camper ombouw Tools (Getallen naar woorden, Currency Conversion, ...)   |   7 Samenvoegen en splitsen Tools (Geavanceerd Combineer rijen, Gespleten cellen, ...)   |   ... en meer

Geef uw Excel-vaardigheden een boost met Kutools voor Excel en ervaar efficiëntie als nooit tevoren. Kutools voor Excel biedt meer dan 300 geavanceerde functies om de productiviteit te verhogen en tijd te besparen.  Klik hier om de functie te krijgen die u het meest nodig heeft...

Omschrijving


Office-tabblad Brengt een interface met tabbladen naar Office en maakt uw werk veel gemakkelijker

  • Schakel bewerken en lezen met tabbladen in Word, Excel, PowerPoint in, Publisher, Access, Visio en Project.
  • Open en maak meerdere documenten in nieuwe tabbladen van hetzelfde venster in plaats van in nieuwe vensters.
  • Verhoogt uw productiviteit met 50% en vermindert honderden muisklikken voor u elke dag!
Comments (40)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you so much. This was very very helpful. You Rock!!
This comment was minimized by the moderator on the site
hi everyone..
i have problem..
i got blank result even i press ctrl shift enter together..
This comment was minimized by the moderator on the site
Hi all, Can some help me to get all unique values on one single cell
This comment was minimized by the moderator on the site
Hi, this worked well! Although it takes Excel sooooo long to calculate. Just dragging down 15 cells in a column takes about 15min to calculate... if not longer. Is this normal? If this becomes dynamic it will take a hell of alot of computing time.
This comment was minimized by the moderator on the site
Hello. This is really helpful, however, what If I want a formula that lists the unique values based on multiple criteria. eg. I have a data set which has the following data in a table (after each hyphen is a new column but same row):

Company A - £200 - £100
Company A - £300 - £200
Company B - £300 - £200
Company C - £600 - £200
Company B - £100 - £300
Company D - £0 - £600
Company A - £700 - £100

I want a new data table in a new tab which groups the duplicate values without using an array formula. currently I'm grouping using a pivot table and pasting to my new data table. It's a long process but array formulas make my spreadsheet really slow.

Company A - £1200 - £400
Company B - £400 - £500
Company C - £600 - £200
Company D - £0 - £600

Thanks,
K
This comment was minimized by the moderator on the site
Hello, K,
For solving your problem, I can recommend our useful tool- Kutools for Excel, with its Advanced Combine Rows feature, you can deal with this job quickly. Firstly, you should copy and paste your data into a new worksheet, and then apply htis feature as below screenhsot shown.
You can know more about this feature from: https://www.extendoffice.com/product/kutools-for-excel/excel-combine-duplicate-rows.html
Please download Kutools for Excel and install it, then apply this feature. Full feature free trial 30-day, please try.
This comment was minimized by the moderator on the site
Hi! the formula works really well. I would like to add another criterion, i mean, get the unique answers but using two criteria
This comment was minimized by the moderator on the site
Hi, Giancarlo,
to extract unique values based on multiple criteria, any of the below formula can help you: (after pasting the formula, please press Ctrl + Shift + Enter keys together.)
=IFERROR(INDEX($C$2:$C$11, MATCH(0, COUNTIF(G1:$G$1, $C$2:$C$11)+IF($A$2:$A$11<>$E$2, 1, 0)+IF($B$2:$B$11<>$F$2, 1, 0), 0)), "")
=INDEX($C$2:$C$11, MATCH(0, IF(($A$2:$A$11=$E$2)*($B$2:$B$11=$F$2), COUNTIF($G$1:$G1, $C$2:$C$11), ""), 0))
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hi. I am using the two conditions formula =IFERROR(INDEX($C$2:$C$11, MATCH(0, COUNTIF(G1:$G$1, $C$2:$C$11)+IF($A$2:$A$11<>$E$2, 1, 0)+IF($B$2:$B$11<>$F$2, 1, 0), 0)), "") to extract a unique list and it works great, but I am struggle to add the SMALL function to get the list sorted as well in ascending order. Are you able to help?
This comment was minimized by the moderator on the site
Is there a way to make this work while ALLOWING for duplicate values? For instance, I want all instances of Lucy to be listed in the results.
This comment was minimized by the moderator on the site
Hello, Konstantin,
To extract all corresponding values including the duplicates based on a specific cell criteria, the following array formula can help you, see screenshot:
=IF(ISERROR(INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2)),"",
INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2))

After inserting the formula, please press Shift + Ctrl + Enter keys together to get the correct result, and then drag the fill handle down to get all values.
Hope this can help you, thank you!
This comment was minimized by the moderator on the site
This has worked great for me with a specific lookup value. However, if I wanted to use a wildcard to look up partial values, how would I do that? For example, if I wanted to lookup all the names associated with KT?

I am using this function to look up cells that contain multiple text. For example if each product also had a sub-product within the same cell but I was only looking for names associated with the sub-product "elf".

KTE - elf
KTE- ball
KTE - piano
KTO - elf
KTO- ball
KTO - piano
This comment was minimized by the moderator on the site
For me the formula does not work. I press ctrl shift enter and i still get an error N/A. I would like to add that i prpared exaclty the same data as in tutorial. What is the reason it does not work?
This comment was minimized by the moderator on the site
How would I get this formula to return each of the duplicates instead of one of each of the names? For instance, in the example above, how would I get the results column (B:B) to return Lucy, Ruby, Anny, Jose, Lucy, Anny, Tom? I'm using this as a budget tool pulling to specific account summaries from a general ledger. However, several of the amounts and transaction descriptions are duplicates in the general ledger. Once the first of the duplicated values is pulled, no more of them get pulled.
This comment was minimized by the moderator on the site
Hi, Joe,
To extract all corresponding values based on a specific cell criteria, the following array formula can help you, see screenshot:
=IF(ISERROR(INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2)),"",
INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2))

After inserting the formula, please press Shift + Ctrl + Enter keys together to get the correct result, and then drag the fill handle down to get all values.
Hope this can help you, thank you!
This comment was minimized by the moderator on the site
Last Question: If I want the results column to return all values not associated with KTE or KTO (so, D:D would be Tom, Nocol, Lily, Angelina, Genna), how would I do that?
This comment was minimized by the moderator on the site
Ok, so it works in the master workbook. There is one exception that I haven't been able to determine the cause of: If the array (in my case, the general ledger that I had beginning in row 3) does not begin in Row 1, the returned values are incorrect. What causes this problem, and which term in the formula fixes it? Thanks again for your help with this!
This comment was minimized by the moderator on the site
So far so good. I'm able to duplicate the results in the test sheet, make changes to the array, and then correct the formula to account for the changes I've made. I plan to move this into the master sheet today and see how it works. Thanks for the help!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations