View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Autofilter - =string in selected cell

did you try activecell.value ?

--


Gary


"al007" wrote in message
ps.com...
Sub Autofilter()
Selection.AutoFilter Field:=5, Criteria1:= _
"=NPF", Operator:=xlAnd
End Sub

How can I amend above code to replace NPF with the contents of my
active cell
(E.g either by Application.InputBox type := ???
or replace NPF by activecell.content ???)

Thxs