How to extract unique values from list in Excel?
For example, you have a list of multiple data in a Worksheet, and some of them are duplicate values, now you need to extract unique values only from the list, how could you do? This tutorial will tell you three easy and quick ways on extracting unique values in Excel.
There are formulas for you to extract unique distinct values (including first duplicates) and unique values (excluding first duplicates).
Note: With formulas to solve the extracting is a little difficult and complex, if you want to extract unique values correctly and sympely, I suggest you to apply the second and third methods.
Extract unique distinct values (including first duplicates)
Select a blank cell, here I select C2, and enter this formula =IFERROR(INDEX($A$2:$A$8, MATCH(0, FREQUENCY(IF(EXACT($A$2:$A$8, TRANSPOSE($C$1:C1)), MATCH(ROW($A$2:$A$8), ROW($A$2:$A$8)), ""), MATCH(ROW($A$2:$A$8), ROW($A$2:$A$8))), 0)), "") ($A$2:$A$8 is the list range of the values you want to extract from, $C$1:C1 is the first cell of the column you want to put out the extracting result), press Shift + Ctrl + Enter buttons, then drag fill handle to fill the range you need. You can see the unique distinct values (including first duplicates) are extracted only:
Extract unique values (excluding first duplicates)
Before you using the formula, you need to define a name for the values range.
1. Select the range, for instance, A2:A8, and click Formula > Define Name. See screenshot:
2. In the New Name dialog, type a name for your range in the Name text box and then click OK to close the dialog. See screenshot:
3.Select a blank cell, here I select C2, type this formula =INDEX(List, MATCH(0,INDEX(COUNTIF(C1:$C$1, List)+(COUNTIF(List, List)<>1),0,0), 0)) (C1:$C$1 is the first cell of the column you want to put out the extracting result, and the List is the range name you defined in the second step ), press Shift + Ctrl + Enter buttons, then drag fill handle to fill the range you need. You can see the unique values (excluding first duplicates) are extracted only:
Note: If you drag the fill handle and fill the cells more than the number of unique values, the excess cells display as error #N/A. Just clear these errors.
In Excel, you can use Advanced Filter function to extract unique distinct values (including first duplicates) only.
1. Select the list range you want to extract unique distinct values from (including the list label), and click Data > Advanced. See screenshot:
2. In the Advanced Filter dialog, check Copy to another location, then select a single cell to put out your result values, and check the Unique records only. See screenshot:
3. Click OK, you can see the result:
The above methods may be not easy and quick enough for you, now you can apply Select Duplicate & Unique Cells feature of Kutools for Excel.
|Kutools for Excel, with more than 300 handy functions, makes your jobs more easier.|
After installing Kutools for Excel, please do as below:（Free Download Kutools for Excel Now!)
1. Select the data list (excluding the list label), and click Kutools > Select > Select Duplicate & Unique Cells. See screenshot:
2. In the Select Duplicate & Unique Cells dialog, check Unique values only or All unique(Including 1st duplicates) box as your need, and click Ok, a dialog pops up to tell you how many rows are selected, click OK to close it. See screenshot:
3. Then all the unique values (excluding or including first duplicates) are selected, copy them to another range you want. See screenshot:
Tip: You also can highlight the unique values or duplicate values with Kutools for Excel's Select Duplicate & Unique Cells.
With Kutools for Excel's Select Duplicate & Unique Cells, you can select only duplicates cells (excluding or including 1st one), and also can select the entire duplicate rows.
quickly extract all email addresses from text strings to another location in Excel
|Sometimes, you may have a list of text strings including the email addresses in Excel, and you want to extract the email addresses to another column for convenient use. With this case, how can you solve this mission? Kutools for Excel’s Extract Mail Address utility can quickly extract the email addresses from text string in Excel. Click for full-featured free trial in days!|
|Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.|
Best Office Productivity Tools
Supercharge Your Spreadsheets： Experience Efficiency Like Never Before with Kutools for Excel
Kutools for Excel boasts over 300 features, ensuring that what you need is just a click away...
Supports Office/Excel 2007-2021 & newer, including 365 | Available in 44 languages | Enjoy a full-featured 30-day free trial.
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!