Results 1 to 5 of 5

Macro to filter on double click on cell

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,231

    Macro to filter on double click on cell

    hello

    i have a list of branches range C61:C134

    this is the macro i have

    Private Sub Worksheet_BeforeDoubleclick(ByVal Target As Range, Cancel As Boolean)
    Dim vFIND As Range
    
        If Not Intersect(Target, Range("B61:B134")) Is Nothing Then
            Cancel = True
            Range("S61") = Target.Offset(, -1).Value
        
        ElseIf Not Intersect(Target, Range("C61:C134")) Is Nothing Then
            Cancel = True
            On Error Resume Next
            With Sheets("Contract wo IBase")
                Set vFIND = .Range("B:B").Find(Target.Value, LookIn:=xlValues, LookAt:=xlWhole)
                If Not vFIND Is Nothing Then
                    Application.EnableEvents = False
                    .Activate
                    vFIND.Select
                    Application.EnableEvents = True
                Else
                    MsgBox "Value not found"
                End If
            End With
        End If
            
    End Sub
    when i double click in range C61:C134 > it takes me directly to the first branch name in the "Contract wo IBase" sheet, however i want it to do the following:
    -when i double click, i want to filter on "Contract wo IBase" sheet and show only those specific branch line accounts.

    can someone direct me or tell me what is wrong with my macro? i inherited the wrkbook so looking for guidance. thanks
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1