I have this filter set up for project. It is filtering data in column D from data on reference cell Q1. This works really well and I can use this to copy the data and paste it in another cell. The problem comes when Q1 is blank, the filter hides everything, which is good, but I do not need to copy blank rows. How can I have this stop if Q1 is blank and not copy anything. Just move on to the next set of coading
sheet10.Activate
With Range("Q1")
If .Value = "" Then
Range("D3").AutoFilter 4, "", xlAnd, "<>"
Else
Range("D3").AutoFilter 4, "*" & .Value & "*"
End If
sheet10.Activate
With Range("Q1")
If .Value = "" Then
Range("D3").AutoFilter 4, "", xlAnd, "<>"
Else
Range("D3").AutoFilter 4, "*" & .Value & "*"
End If