Hello all
I hope you can help on this one
Is it possible to filter your data based on a value from another worksheet in the same workbook.
I want to filter on any rows not equal to "<> INST", This is the code I have am playing with but it's not working, I can get it to work if I hard code it to "<>INST" but I wanted the flexibility of change the value in sheet5 cell "C2"
I hope you can help on this one
Is it possible to filter your data based on a value from another worksheet in the same workbook.
I want to filter on any rows not equal to "<> INST", This is the code I have am playing with but it's not working, I can get it to work if I hard code it to "<>INST" but I wanted the flexibility of change the value in sheet5 cell "C2"
Code:
With Sheets("Data")
If .AutoFilterMode Then .AutoFilterMode = False
.Range("N:N").AutoFilter 1, "<>" & Sheet5.Range("C2")
.AutoFilter.Range.Offset(1).EntireRow.Delete
.AutoFilterMode = False
End With