Skip to main content

How to use VLOOKUP to create a unique list from table in Excel?

Author: Sun Last Modified: 2020-09-08

Here is a table containing class and the student names. However, some values in the list are duplicates. What I want is to have a list of unique names based on “Class A” as below screenshot shown. How can I handle this job by using VLOOKUP function in Excel?
doc vlookup unique list 1

Use VLOOUP to create a unique list from given table

Use VLOOUP to create a unique list from given table

Here is a somewhat long VLOOKUP formula that can deal with the job.

Select a cell below the criterion which you want to create the unique list based on, type this formula =IFERROR(INDEX(B$1:B$13, MATCH(0, COUNTIF(D$1:D1, IF(A$1:A$13=D$1,B$1:B$13,D$1)), 0)),""), press Shift + Ctrl + Enter keys to get the correct value, and then drag fill handle down until blank cell appears. See screenshot:
doc vlookup unique list 2

Note: In the formula, B$1:B$13 is the column you will lookup values from, A$1:A$13 is the column you will lookup value based on, D$1 is the cell with the specified criteria.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


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!
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, thanks for this! Can you show what is in B9 on sheet 18 please? Dragging the formula down I get the same result on every cell. thanks!
This comment was minimized by the moderator on the site
Hoe kan ik ervoor zorgen dat ik waardes die vaker voorkomen in de eerste lijst ook vaker terugkomen in de tweede lijst?
In het geval van het voorbeeld zoals met Rose gebeurt, die naam staat twee keer in de lijst voor Class A maar wordt maar 1 keer weergegeven in de rechter lijst.
This comment was minimized by the moderator on the site
Hi, Sander, sorry I do not understand Dutch, could you decribe your question in English? And if you could, please upload an attchment which list your data example for me to better understand what you need.
The methods provided in this tutorial is for getting the unique value based on class A or class B, if you want to get all values from class A, you need to search other methods.
This comment was minimized by the moderator on the site
Why is this formula returning duplicate values?

=IFERROR(INDEX('PA Tool Components'!$D:$D, MATCH(0, COUNTIF('ONBM1 Boyce'!B$7, IF('PA Tool Components'!C:C='ONBM1 Boyce'!$B$7, 'PA Tool Components'!$D:$D, 'ONBM1 Boyce'!$B$7)), 0)), "")
This comment was minimized by the moderator on the site
Hi, Connor Willings, please try below formula, change Sheet17 to PA Tool Components, Sheet18 to ONBM1 Boyce.
=IFERROR(INDEX(Sheet17!D:D, MATCH(0, COUNTIF(Sheet18!B$7:B8, IF(Sheet17!C:C=Sheet18!B$7,Sheet17!D:D,Sheet18!B$7)), 0)),"")
please see the screenshot:
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations