Thread: Macro Question
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Carl Carl is offline
external usenet poster
 
Posts: 361
Default Macro Question

Thought I would try a new post instead of trying to work on a previous one.

I am using this:

Sub temp()
Sheets("TMS").Select
Selection.AutoFilter Field:=1, Criteria1:=S, Operator:=xlAnd
Range("F1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("CheckNamesSent").Select
Range("I4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub

Note that 'Selection.AutoFilter Field:=1, Criteria1:=S, Operator:=xl' the
variable S needs definition.

I have a list in G6:G8. I need the above code to repeat for each value in
this list. Not sure how to do this (as it is important that the "S" value
also updates to reflect the next vlaue in the list - G6, G7,G8).

THank you in advance.