Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all,
I have a question in terms of a unique list generation. My list looks like: Column A Name1 Name2 Name3 Name1 Name1 Column B Name4 Name2 Name3 Name1 Name1 Name2 and so on The result I am looking for is a new spreadsheet containing: Name1 Name2 Name3 Name4 Any ideas about how to get that ready? Thank you in advance. Cheers, Avenarius |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Lots of people ask for the macro
Sub mergecolumns() Set OldSheet = ActiveSheet With OldSheet LastRowColA = Cells(Rows.Count, "A").End(xlUp).Row Set ColARange = .Range(Cells(1, "A"), _ Cells(LastRowColA, "A")) LastRowColB = Cells(Rows.Count, "B").End(xlUp).Row Set ColBRange = .Range(Cells(1, "B"), _ Cells(LastRowColB, "B")) End With Worksheets.Add after:=ActiveSheet ActiveSheet.Name = "Summary" RowCount = 1 For Each cell In ColARange If RowCount = 1 Then Cells(RowCount, "A") = cell.Value RowCount = RowCount + 1 Else Set ColRange = Range(Cells(1, "A"), _ Cells(RowCount - 1, "A")) Set c = ColRange.Find _ (what:=cell.Value, LookIn:=xlValues) If c Is Nothing Then Cells(RowCount, "A") = cell.Value RowCount = RowCount + 1 End If End If Next cell For Each cell In ColBRange If RowCount = 1 Then Cells(RowCount, "A") = cell.Value RowCount = RowCount + 1 Else Set ColRange = Range(Cells(1, "A"), _ Cells(RowCount - 1, "A")) Set c = ColRange.Find _ (what:=cell.Value, LookIn:=xlValues) If c Is Nothing Then Cells(RowCount, "A") = cell.Value RowCount = RowCount + 1 End If End If Next cell End Sub "Avenarius" wrote: Hi all, I have a question in terms of a unique list generation. My list looks like: Column A Name1 Name2 Name3 Name1 Name1 Column B Name4 Name2 Name3 Name1 Name1 Name2 and so on The result I am looking for is a new spreadsheet containing: Name1 Name2 Name3 Name4 Any ideas about how to get that ready? Thank you in advance. Cheers, Avenarius |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is it a way to get a unique list from multiple columns? | New Users to Excel | |||
How can I average data from a repeating list into a unique list? | Excel Worksheet Functions | |||
Compare multiple column of data and list out common and unique component in adj columns | Excel Worksheet Functions | |||
Data Validation using List (But needs unique list in drop down lis | New Users to Excel | |||
Making list with unique columns | Excel Worksheet Functions |