View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman[_2_] Mike Fogleman[_2_] is offline
external usenet poster
 
Posts: 206
Default msg box to apply filter

Sub Filter()
Dim rng As Range
Dim MyCrit As String

MyCrit = InputBox("Enter Filter Criteria")
Set rng = Range("E1:F8")
rng.AutoFilter Field:=1, Criteria1:=MyCrit
End Sub

Mike F
"Kirsty" wrote in message
...
Hi,

I want a macro that has a message box to ask for input and then filters
the
data based on hte input. How would I go about this?