Unique list without office 365

Sufiyan97

Well-known Member
Joined
Apr 12, 2019
Messages
1,538
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
I want to create a unique list of names from two different columns

A and B are source and expected result is in column D

Book6
ABCDE
1List1List2Unique
2DaveDaveDave
3DaveDaveDwayne
4DwayneDaveJoy
5DwayneDwayneAmy
6DwayneJoyRonny
7DwayneJoyCary
8JoyJoy
9JoyJoy
10JoyJoy
11AmyRonny
12AmyCary
13Ronny
14
15
Sheet1
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Is VBA ok?

VBA Code:
Sub jec()
 Dim c00, it
 With CreateObject("scripting.dictionary")
   For Each it In Range("A2:B" & Range("A" & Rows.Count).End(xlUp).Row)
      c00 = .Item(it.Value)
   Next
   Cells(2, 5).Resize(.Count) = Application.Transpose(.keys)
 End With
End Sub
 
Last edited:
Upvote 0
Hello JEC
Thanks for the response
I am looking for the formula solution if possible.
 
Upvote 0
Note that Microsoft offers Power Query for both Excel 2010 and Excel 2013 in both 32- and 64-bit platforms. ... From the Excel Ribbon, choose File→Options. Choose the Add-Ins option on the left, and then look for the Manage drop-down list at the bottom of the dialog box. Select COM Add-Ins and then click Go.

In Power Query:

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    lst = List.Distinct(List.RemoveNulls(Source[List1] & Source[List2]))
in
    lst

Book2
ABCDE
1List1List2Table1
2DaveDaveDave
3DaveDaveDwayne
4DwayneDaveJoy
5DwayneDwayneAmy
6DwayneJoyRonny
7DwayneJoyCary
8JoyJoy
9JoyJoy
10JoyJoy
11AmyRonny
12AmyCary
13Ronny
14
Sheet1


Also in PQ the output can be sorted easily:

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    lst = List.Sort(List.Distinct(List.RemoveNulls(Source[List1] & Source[List2])))
in
    lst

Book2
ABCDE
1List1List2Table1
2DaveDaveAmy
3DaveDaveCary
4DwayneDaveDave
5DwayneDwayneDwayne
6DwayneJoyJoy
7DwayneJoyRonny
8JoyJoy
9JoyJoy
10JoyJoy
11AmyRonny
12AmyCary
13Ronny
14
Sheet1
 
Upvote 0
Ok how about (array formula)

Excel Formula:
=INDIRECT(TEXT(MIN(IF(($A$2:$B$13<>"")*(COUNTIF($E$1:E1,$A$2:$B$13)=0),ROW($2:$13)*100+COLUMN($A:$B),EXP(99))),"R00C00"),)
 
Upvote 0
Another option.
Book1
ABCD
1List1List2Unique
2DaveDaveRonny
3DaveDaveAmy
4DwayneDaveJoy
5DwayneDwayneDwayne
6DwayneJoyDave
7DwayneJoyCary
8JoyJoy 
9JoyJoy 
10JoyJoy 
11AmyRonny 
12AmyCary
13Ronny
Sheet1
Cell Formulas
RangeFormula
D2:D11D2=IFNA(IFERROR(LOOKUP(2,1/(COUNTIF($D$1:D1,$A$2:$A$13)=0),$A$2:$A$13),LOOKUP(2,1/(COUNTIF($D$1:D1,$B$2:$B$12)=0),$B$2:$B$12)),"")
 
Upvote 0
Hello @AhoyNC

This works perfect

just one thing if we can do like I have changed range to 500 rows so we don't need to change formula every time, so I am getting 0 in D2.

can we modify it so it does not show 0?

Book1
ABCDE
1List1List2Unique
2DaveDave0
3DaveDaveAli
4DwayneDaveRonny
5DwayneDwayneAmy
6DwayneJoyJoy
7DwayneJoyDwayne
8JoyJoyDave
9JoyJoyMoin
10JoyJoyCary
11AmyRonny 
12AmyCary
13RonnyAli
14AliMoin
15
Sheet1
Cell Formulas
RangeFormula
D2:D11D2=IFNA(IFERROR(LOOKUP(2,1/(COUNTIF($D$1:D1,$A$2:$A$500)=0),$A$2:$A$500),LOOKUP(2,1/(COUNTIF($D$1:D1,$B$2:$B$500)=0),$B$2:$B$500)),"")
 
Upvote 0
Try:
Book1 (version 1).xlsb
ABCD
1List1List2Unique
2DaveDaveRonny
3DaveDaveAmy
4DwayneDaveJoy
5DwayneDwayneDwayne
6DwayneJoyDave
7DwayneJoyCary
8JoyJoy 
9JoyJoy 
10JoyJoy 
11AmyRonny 
12AmyCary
13Ronny
14
Sheet1
Cell Formulas
RangeFormula
D2:D11D2=IFNA(IFERROR(LOOKUP(2,1/(IF($A$2:$A$500<>"",COUNTIF($D$1:D1,$A$2:$A$500)=0)),$A$2:$A$500),LOOKUP(2,1/(IF($B$2:$B$500<>"",COUNTIF($D$1:D1,$B$2:$B$500)=0)),$B$2:$B$500)),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,091
Messages
6,123,062
Members
449,090
Latest member
fragment

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top