Solved Can you maintain blank rows with a vba auto filter?

September 20, 2016 at 15:24:13
Specs: Windows 7 Pro 64, i7/8GB
I have a worksheet with data that is automatically filtered when a date is entered in cell I1 via a Worksheet_Change(ByVal Target As Range) macro.

Rows in the table are grouped together by order number with a blank row between orders to aid human readability.

Is there something I can add to the vba to maintain the blank rows when filtering by date?


See More: Can you maintain blank rows with a vba auto filter?

Reply ↓  Report •


#1
September 20, 2016 at 16:47:24
✔ Best Answer
Since we don't know what your VBA looks like, we can't really tell you what to add.

This generic code might point you in the right direction.

With Sheet1
      .AutoFilterMode = False
      .Range("A1:D10").AutoFilter
      .Range("A1:D10").AutoFilter Field:=2, Criteria1:=">=35", _
             Operator:=xlOr, Criteria2:="="
End With

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Reply ↓  Report •

#2
September 21, 2016 at 09:45:00
That took care of it, thanks!

Reply ↓  Report •

Related Solutions


Ask Question