V
VBA Noob
Hi all,
I'm still having trouble with this one.
I've a list of names in A14 to around A130. I can make a Unquie List
with the below code around 29 unique items.
I now need to check each cell from A14 down. If A14 to A19 are say item
1 in Array e.g John I need it to
Add a new sheet.
Copy A14:AW19
Paste all then paste Special Values
Then loop through the next name in array and do the same. Any help
appreciated as ever
Code:
--------------------
Sub UniqueList()
Dim rRange As Range, rCell As Range
Dim wSheet As Worksheet
Dim wSheetStart As Worksheet
Dim strText As String
Set wSheetStart = ActiveSheet
wSheetStart.AutoFilterMode = False
Set rRange = Range("A13", Range("A65536").End(xlUp))
On Error Resume Next
Application.DisplayAlerts = False
Worksheets("UniqueList").Delete
Worksheets.Add().Name = "UniqueList"
With Worksheets("UniqueList")
rRange.AdvancedFilter xlFilterCopy, , _
Worksheets("UniqueList").Range("A13"), True
Set rRange = .Range("A14", .Range("A65536").End(xlUp))
End With
arr = rRange
'Loop
End Sub
I'm still having trouble with this one.
I've a list of names in A14 to around A130. I can make a Unquie List
with the below code around 29 unique items.
I now need to check each cell from A14 down. If A14 to A19 are say item
1 in Array e.g John I need it to
Add a new sheet.
Copy A14:AW19
Paste all then paste Special Values
Then loop through the next name in array and do the same. Any help
appreciated as ever
Code:
--------------------
Sub UniqueList()
Dim rRange As Range, rCell As Range
Dim wSheet As Worksheet
Dim wSheetStart As Worksheet
Dim strText As String
Set wSheetStart = ActiveSheet
wSheetStart.AutoFilterMode = False
Set rRange = Range("A13", Range("A65536").End(xlUp))
On Error Resume Next
Application.DisplayAlerts = False
Worksheets("UniqueList").Delete
Worksheets.Add().Name = "UniqueList"
With Worksheets("UniqueList")
rRange.AdvancedFilter xlFilterCopy, , _
Worksheets("UniqueList").Range("A13"), True
Set rRange = .Range("A14", .Range("A65536").End(xlUp))
End With
arr = rRange
'Loop
End Sub