I have a cell that has text data that filters the range I need. It works great when there is data in there. When that cell is blank, is does not filter out the range that has data.
sheet10.Activate
Range("D3").AutoFilter Field:=4, Criteria1:= _
"=*" & Range("Q1").Value & "*", Operator:=xlAnd
How can i get it to filter based on the data in the cell, but hide rows in the range when the cell is blank. The cell Q1 is the cell with the data that needs to be filtered and if that cell is blank, hide rows with data.
sheet10.Activate
Range("D3").AutoFilter Field:=4, Criteria1:= _
"=*" & Range("Q1").Value & "*", Operator:=xlAnd
How can i get it to filter based on the data in the cell, but hide rows in the range when the cell is blank. The cell Q1 is the cell with the data that needs to be filtered and if that cell is blank, hide rows with data.