Using VBA code to delete rows that are blank between pivot tables

cinstanl

New member
Joined
Dec 5, 2016
Messages
6
Reaction score
0
Points
0
I have two pivot tables on a worksheet. I need to add code to delete all except two blank rows between the pivot table upon refresh. I added code but it is only deleting 1 blank row...The code that I added was:

Code:
Sub DeleteBlankRows2()


On Error Resume Next
Selection.EntireRow.SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
    
End Sub
 
Back
Top