califrania
New Member
- Joined
- Jul 28, 2015
- Messages
- 5
Hi!
Row 3 has a column header labeled "Description" and I want to filter out all cells containing the words "tech" & "qa" in that column. My macro can find the column and the DesRng can find the correct cells
But..my last line of code (with the Auto Filters) will not work
I think this is because all the cells contain formulas that pull the text in, rather than the text actually living in cell - but idk how to work around this.
Any help appreciated!
Dim DesCol, LastRow As Integer
Dim DesRng, As Range
Cells(3, 1).Select
Do While ActiveCell <> "Description"
ActiveCell.Offset(0, 1).Select
Loop
DesCol = ActiveCell.Column
LastRow = Cells(rows.Count, DesCol).End(xlUp).Row
Set DesRng = Range(Cells(3, DesCol).Address(), Cells(LastRow, DesCol).Address())
DesRng.AutoFilter Field:=1, Criteria1:="<>*tech*", Operator:=xlAnd, Criteria2:="<>*qa*"
Row 3 has a column header labeled "Description" and I want to filter out all cells containing the words "tech" & "qa" in that column. My macro can find the column and the DesRng can find the correct cells
But..my last line of code (with the Auto Filters) will not work
I think this is because all the cells contain formulas that pull the text in, rather than the text actually living in cell - but idk how to work around this.
Any help appreciated!
Dim DesCol, LastRow As Integer
Dim DesRng, As Range
Cells(3, 1).Select
Do While ActiveCell <> "Description"
ActiveCell.Offset(0, 1).Select
Loop
DesCol = ActiveCell.Column
LastRow = Cells(rows.Count, DesCol).End(xlUp).Row
Set DesRng = Range(Cells(3, DesCol).Address(), Cells(LastRow, DesCol).Address())
DesRng.AutoFilter Field:=1, Criteria1:="<>*tech*", Operator:=xlAnd, Criteria2:="<>*qa*"
Last edited: