Consulting

Results 1 to 3 of 3

Thread: filter data Automatically with wildcard characters string

  1. #1

    filter data Automatically with wildcard characters string

    Hi experts,

    Here I prepared filter sheet where data sort as per criteria selection with vba code.

    Explanation:
    If I select company name in D10 & Analyst Name in D11 then data sort as per criteria match. if both criteria match then data show otherwise no.

    If company selected in D10 and analyst name select in D11 as blank then data will sort only that company. If Analyst Name selected in D11 and Company name select in D10 as blank then data will sort only that Analyst Name

    Here I am facing issue in cell C27, C28, C31, C32 because of multiple companies in one cell, so I want VBA Code will modified as wildcard search. If I put only HDFC then all cell will be filter where HDFC text found in range in column C.

    Can it possible?

    Regards
    Amar Takale
    Attached Files Attached Files

  2. #2
    VBAX Contributor
    Joined
    Jul 2017
    Location
    Zurich
    Posts
    132
    Location
    I've changed your worksheet_change sub from as follows:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim i As Integer
        If Not Intersect(Target, Range("d10:d11")) Is Nothing Then
            For i = 1 To 2
                [d14:f14].AutoFilter i, Criteria1:="*" & Range("d" & i + 9) & "*"
            Next i
        End If
    End Sub

  3. #3
    Great!

    Thanks very much sir

Posting Permissions

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