View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default How do I set autofilter criteria as the ActiveCell Value in VBA?

Hi Gulfera63,

Try something like:

Sub Tester()
Dim rng As Range

Set rng = ActiveCell
Range("A1").AutoFilter Field:=1, Criteria1:=rng.Value

End Sub

---
Regards,
Norman



"gulfera63" wrote in message
...
Trying to create a macro with an autofilter criteria that refers to the
active cell value, so that changing the active cell will change the
filtering
criteria.
I looked through help and knowledge base but cicn't find an answer, I'm
not
a proficient user though.
Thanks