I need help to get this work. I use excel 2007 but this work book is saved excel 97-2003 version.
I have a sheet where I have data A3 to B500 and I want that user can filter column by value change cell B1, but this is not working. So its not work at all
Can someone check and give correction?

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo ErrHandle
Application.ScreenUpdating = False
' when value change cell B1
If Target.Address = "$B$1" Then

Application.EnableEvents = False

Range("B3").Select

Selection.AutoFilter Field:=2, Criteria1:="*" & Range("B1") & "*"
Range("B1").Select

End If
ErrHandler:
Application.EnableEvents = True
Application.ScreenUpdating = True

This is working when I choose macro by button but I wanted to make filter work automatic when user inser value exampel 105 then result is column B all cells which including 105.

Sub Suodata_omavalinta()
Range("B3").Select
Selection.AutoFilter Field:=2, Criteria1:="*" & Range("B1") & "*"
End Sub

I create button which use this macro


Koodi Nimike
A-KD10V1 10V TARK.OSAT DINO 105T
A-KD10V2 10V TARK.OSAT DINO 125T
A-KD10V3 10V TARK.OSAT DINO 150T
A-KD10V4 10V TARK.OSAT DINO 150ZX
A-KD10V5 10V TARK.OSAT DINO 180T
A-KD10V6 10V TARK.OSAT DINO 180XT
A-KD10V7 10V TARK.OSAT DINO 210XT
A-KD10V8 10V TARK.OSAT DINO 260XT