ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   unique list from a range of cells (https://www.excelbanter.com/excel-programming/385176-unique-list-range-cells.html)

elaine

unique list from a range of cells
 
Hi,

I have several columns of data, they are all names.


Some of the names are duplicate within the range of columns. Is there
a way to display a unique list of data in the next available column?


Thanks.
Elaine.


Gary''s Student

unique list from a range of cells
 
Say your data is in columns A & B & C.

1. put a label in D1 and copy ALL your data to column D
at this point the column A data is in the top part of column d
the column B data is in the mid part of column D
the column C data is in the lower part of column D


2. Pull-down:
Data Filter... Advanced FIlter and choose Unique records only.
--
Gary''s Student
gsnu200710


"elaine" wrote:

Hi,

I have several columns of data, they are all names.


Some of the names are duplicate within the range of columns. Is there
a way to display a unique list of data in the next available column?


Thanks.
Elaine.



elaine

unique list from a range of cells
 
hi, what if i have more tahn 30,000 rows in each column?? i cant put
all the info into one single column as the max number of row is just
about 65k rows?




Gary''s Student

unique list from a range of cells
 
In that case even the uniques may be more than 65536 entries. Where should
they be stored??
--
Gary''s Student
gsnu200710


"elaine" wrote:

hi, what if i have more tahn 30,000 rows in each column?? i cant put
all the info into one single column as the max number of row is just
about 65k rows?





elaine

unique list from a range of cells
 
i was thinking whether theres a way to display in the nex available
column. when that column is full, then display on the next available
column etc.



Gary''s Student

unique list from a range of cells
 
If the original is in columns A & B & C, then first copy them to D & E & F
and run:

Sub ordinate()
Set r1 = Intersect(ActiveSheet.UsedRange, Range("D:F"))
For i = 4 To 6
n = Cells(Rows.Count, i).End(xlUp).Row
For j = n To 1 Step -1
v = Cells(j, i).Value
If Application.WorksheetFunction.CountIf(r1, v) 1 Then
Cells(j, i).Delete Shift:=xlUp
End If
Next
Next
End Sub

--
Gary''s Student
gsnu200710


"elaine" wrote:

i was thinking whether theres a way to display in the nex available
column. when that column is full, then display on the next available
column etc.





All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com