How to use VLOOKUP to create a unique list from table in Excel?
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?
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:
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
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!