# Creating a List From the Unique Data of Two Separate Rows.

#### LearningExcel0

##### New Member
I am attempting to create a list from the unique data of 2 row. I have tried VLOOKUP, MATCH, and PivotTables and couldn't find what I'm looking for, I am still new to Excel and its various functions.

An example of what I'm trying to accomplish is:
In A1 to A5 we have: a,b,c,d,e and in B1 to B5 we have: a,b,c,f,g

I want row C to show e,d as a list and row D to show f,g as a list.

As row C removes the duplicates between rows A and B and as a list keeps the unique values of row A, while row D removes the duplicates between rows A and B and as a list keeps the unique values of row B.

If anyone could help me out with a formula or a direction of which formula or functions I could use it would be greatly appreciated.

#### My Aswer Is This

##### Well-known Member
There is no such thing as Row C
Your quote:"I want row C to show e,d as a list and row D to show f,g as a list."

In Excel we have Columns A,B,C,D etc. etc.
And we have Rows 1,2,3,4 etc. etc.

##### MrExcel MVP
 Row\Col A​ B​ C​ D​ 1​ a a d f 2​ b b e g 3​ c c 4​ d f 5​ e g

In C2 control+shift+enter, not just enter, and copy down:
Rich (BB code):
``````
=IFERROR(INDEX(\$A\$1:\$A\$5,SMALL(IF(1-ISNUMBER(MATCH(\$A\$1:\$A\$5,\$B\$1:\$B\$5,0)),
ROW(\$A\$1:\$A\$5)-ROW(\$A\$1)+1),ROWS(\$C\$2:C2))),"")
``````
In D2 control+shift+enter, not just enter, and copy down:
Rich (BB code):
``````
=IFERROR(INDEX(\$B\$1:\$B\$5,SMALL(IF(1-ISNUMBER(MATCH(\$B\$1:\$B\$5,\$A\$1:\$A\$5,0)),
ROW(\$B\$1:\$B\$5)-ROW(\$B\$1)+1),ROWS(\$D\$2:D2))),"")
``````
<strike></strike><strike></strike>

#### LearningExcel0

##### New Member
Thank you. Corrected it should say:

An example of what I'm trying to accomplish is:
In A1 to A5 we have: a,b,c,d,e and in B1 to B5 we have: a,b,c,f,g

I want column C to show e,d as a list and column D to show f,g as a list.

As column C removes the duplicates between columns A and B and as a list keeps the unique values of column A, while column D removes the duplicates between columns A and B and as a list keeps the unique values of columns B.

Is there a way to edit my original document? This is my first post, Thank you.

#### LearningExcel0

##### New Member
That is exactly what I was looking for! Thank you very much!

##### MrExcel MVP
That is exactly what I was looking for! Thank you very much!
You are welcome.

1,082,359
Messages
5,364,919
Members
400,815
Latest member
Joaquin Phoenix

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...