• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Every time macro run on another sheet based on cell value (worksheet event)

b_raj_kumar

New Member
HI

I wrote below code but advanced filter is not working on "Filtered Data" sheet.

>>> use code - tags <<<
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   
 ' first remove filter
   'If Target.Cells.Count > 1 Then GoTo done
   If Application.Intersect(Target, ActiveSheet.Range("g2")) Is Nothing Then GoTo done
  
   Call Macro2
done:
   Exit Sub
End Sub


Sub Macro2()
Dim ws As Worksheet
If ws.AutoFilterMode Then
  ws.ShowAllData
End If
Set ws = Worksheets("Filtered Data")
    ws.Range("A:BL").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange _
        :=Range("BN1:BS2"), Unique:=False
End Sub
regards
raj kumar
 
Last edited by a moderator:
Hi,​
as you already received help on another forum so no need anymore to try to solve your guessing challenge​
as a reminder this is an Excel forum, not a mind readers one …​
 
Back
Top