Here's one approach:
In a new sheet, copy column B underneath column A so that it is one long list. Then Remove all duplicates:
- Highlight the whole list
- Press ALT+D, F, A
- Select 'Copy to another location'
- Check 'Unique Records Only'
- Select a cell to copy to in the 'Copy to' field.
- Click Ok
In the cell to the right of your new unique list use the following formula and copy all the way to the end of the list:
=IF(ISNA(VLOOKUP(D2,$A$2:$A$10,1,0)),"",VLOOKUP(D2,$A$2:$A$10,1,0))
Where:
- D2 = The first cell of your unique list.
- $A$2:$A$1 = The first column of your original lists.
Next to the cell where you entered the above formula enter this:
=IF(ISNA(VLOOKUP(D2,$B$2:$B$10,1,0)),"",VLOOKUP(D2,$B$2:$B$10,1,0))
Where:
- D2 = The first cell of your unique list.
- $B$2:$B$1 = The second column of your original lists.
This should give you what you're looking for.
Note: I don't know what version of Excel you have. There are easier ways to do some of these steps in later versions.