View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JR in NC JR in NC is offline
external usenet poster
 
Posts: 1
Default Cell references in macros

Dan, you can play with this: (values in A1 & A2)

Selection.AutoFilter Field:=1, Criteria1:="=" & Cells(1, 1),
Operator:=xlAnd _
, Criteria2:="<=" & Cells(2, 1)

jr


"Dan" wrote:

I have a macro with the following statement:


Selection.AutoFilter Field:=1, Criteria1:="=5/15/2006", Operator:=xlAnd _
, Criteria2:="<=5/28/2006"

I want to replace the two dates with references to the values in cells B1
and B2 in the sheet "Macro Data". How do I do this?

Dan