Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I use autofilter to run through the list of items? I'm getting
data and column R is product ID. I would like to filter the first item in the list, run some code on it and then move to the next item until it has gone through the enitre list. I can't figure out how to do this though. Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Sub Filterem() Dim Itms As New Collection Dim R As Long On Error Resume Next For R = 2 To Cells(65000, 18).End(xlUp).Row Itms.Add Cells(R, 18).Value, Cells(R, 18).Value Next On Error GoTo 0 For R = 1 To Itms.Count Range("R2").CurrentRegion.AutoFilter Field:=1, Criteria1:=Itms(R) MsgBox Itms(R), , R & " of " & Itms.Count Next End Sub HTH. Best wishes Harald "JeffMelton" skrev i melding ps.com... How can I use autofilter to run through the list of items? I'm getting data and column R is product ID. I would like to filter the first item in the list, run some code on it and then move to the next item until it has gone through the enitre list. I can't figure out how to do this though. Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple criteria in autofilter | Excel Worksheet Functions | |||
AutoFilter criteria | Excel Programming | |||
Autofilter Multiple Criteria | Excel Programming | |||
AutoFilter Criteria VBA | Excel Programming | |||
VBA Autofilter Criteria | Excel Programming |