i have created a sheet which will filter the database and paste the filtered data to another sheet and sort ascending the filtered data. this is the code :
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A4:F4")) Is Nothing Then
Dim DataSH As Worksheet
Set DataSH = Sheets("Database")
DataSH.Range("A:M").AdvancedFilter action:=xlFilterCopy, copytorange:=Range("A9:M9"), criteriarange:=Range("A3:F4")
Range("A10:J500").Sort Key1:=Range("J10"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
:=xlStroke, DataOption1:=xlSortNormal
End If
End Sub
but now i want to add a scroll down bar on the criteria range, something like the autofilter, just the filtered data will paste to another sheet n automatically sort ascending then.
can anyone help me with the code? thanks
Bookmarks