View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Looping on Criteria

Have you try my example in your other thread ?

--
Regards Ron de Bruin
http://www.rondebruin.nl



"VBA Noob" wrote in message
...

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


--------------------



VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=571493