Function select unique

dennisli

Well-known Member
Joined
Feb 20, 2004
Messages
1,070
Good afternoon,
In range A1:A100, there are 100 names. But some names maybe come out more than one time, like there are three John.
In column 2, I want to show the unique names, like only one John shown even there are three John in column 1.
Can I use some functions to achieve it?
Thanks lot.
Dennis
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Here's a UDF that I created to ID unique or duplicate values. Just store it in a module on the current workbook and call it on the worksheet

=FindDuplicate(A1:A500,A1)

Public Function FindDuplicate(SearchRange As Range, Value As Range) As String
Dim R As Range
For Each R In SearchRange
If R.Address <> Value.Address Then
If R.Value = Value.Value Then
FindDuplicate = "Duplicate Value"
Exit Function
End If
End If
Next

FindDuplicate = "Unique Value"
End Function
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,705
Members
449,048
Latest member
81jamesacct

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