Criteria1 (cell D1) has multiple words separated by commas and I want the column in the "Projects" sheet to be filtered by these words.
How to add the ability to filter the column with several words to the following code?
Data sheet is in "Projects" sheet and in table= "projectstbl" and Data column= AC column, Field= 29, Header=1st row, Table Range= A2:AQ2100
Criteria is in "keywords analysis" sheet, D1 cell.
Thank you.
VBA code:
How to add the ability to filter the column with several words to the following code?
Data sheet is in "Projects" sheet and in table= "projectstbl" and Data column= AC column, Field= 29, Header=1st row, Table Range= A2:AQ2100
Criteria is in "keywords analysis" sheet, D1 cell.
Thank you.
VBA code:
VBA Code:
Sub Filtering_AC_v2()
Dim namebakhsh As String
namebakhsh = Worksheets("Keywords Analysis").Range("D1").Value
Application.Calculation = xlCalculationManual
With Worksheets("Projects")
.AutoFilterMode = False
.Range("A1:AQ" & .Cells(.Rows.Count, "AC").End(xlUp).Row).AutoFilter Field:=29, Criteria1:=namebakhsh
End With
Application.Calculation = xlCalculationAutomatic
End Sub