ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro Question (https://www.excelbanter.com/excel-discussion-misc-queries/167390-macro-question.html)

Vick

Macro Question
 
I'm having trouble with the following code. I'm trying to turn on an auto
filter using a value in the range below. From there I'm doing some things,
and then I want to come back to the next value in the range, skipping blanks.

Dim cell As Range
For Each cell In Range("B3:B32")
If cell < "" Then
Value = Test

Range("A1").Select
Sheets("WIP Detail").Select
'Turn on Auto Filter & Select Client Number
Range("A1").Select
Selection.AutoFilter Field:=13, Criteria1:=Test

Thanks
Vick

Don Guillett

Macro Question
 
try

For Each c In Range("B3:B32")
If c < "" Then
Sheets("WIP Detail").AutoFilter Field:=13, Criteria1:=c
'what else
end if
next


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Vick" wrote in message
...
I'm having trouble with the following code. I'm trying to turn on an auto
filter using a value in the range below. From there I'm doing some things,
and then I want to come back to the next value in the range, skipping
blanks.

Dim cell As Range
For Each cell In Range("B3:B32")
If cell < "" Then
Value = Test

Range("A1").Select
Sheets("WIP Detail").Select
'Turn on Auto Filter & Select Client Number
Range("A1").Select
Selection.AutoFilter Field:=13, Criteria1:=Test

Thanks
Vick




All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com