Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
the code i have so far is...
Private Sub NewList() Dim c As Range Dim LastC As Range Dim i As Integer Set LastC = Range("A65354").End(xlUp) For Each c In Range("A2", LastC) If c < "" Then Range("B2").Offset(i, 0) = c.Value i = i + 1 End If Next c End Sub this takes the blanks out of a range, but i need to also incorporate only copying unique cells...... so converting ColA to ColB ColA ColB test1 test1 test2 test2 test1 test3 <blank test3 <blank test1 and then how making a named range out of ColB would be really helpful too...or at least finding the last cell (test3 in the example) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub NewList()
Dim c As Range Dim LastC As Range Dim i As Integer Set LastC = Cells(rows.count,1).End(xlUp) For Each c In Range("A2", LastC) If len(trim(c)) 0 Then if application.Countif(Columns(2),c) = 0 then Range("B2").Offset(i, 0) = c.Value i = i + 1 End if End If Next c if Not isempty(Range("B3")) then Range("B2",Range("B2").end(xldown)).Name = "List1" Else Range("B2").Name = "List1") End if End Sub -- Regards, Tom Ogilvy "Nigel" wrote in message oups.com... the code i have so far is... Private Sub NewList() Dim c As Range Dim LastC As Range Dim i As Integer Set LastC = Range("A65354").End(xlUp) For Each c In Range("A2", LastC) If c < "" Then Range("B2").Offset(i, 0) = c.Value i = i + 1 End If Next c End Sub this takes the blanks out of a range, but i need to also incorporate only copying unique cells...... so converting ColA to ColB ColA ColB test1 test1 test2 test2 test1 test3 <blank test3 <blank test1 and then how making a named range out of ColB would be really helpful too...or at least finding the last cell (test3 in the example) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula (not adv. filter) to list unique values from list | Excel Worksheet Functions | |||
How to pick out unique components in a list with unique and common | Excel Discussion (Misc queries) | |||
Identify & List unique values from a list using functions/formulas | Excel Worksheet Functions | |||
Array Formulas - Unique List from List with Duplicates | Excel Discussion (Misc queries) | |||
Data Validation using List (But needs unique list in drop down lis | New Users to Excel |