View Single Post
 
Old 12-24-2014, 09:50 AM
beginner beginner is offline Windows 7 32bit Office 2007
Advanced Beginner
 
Join Date: Sep 2011
Location: Europe
Posts: 45
beginner will become famous soon enough
Default

I have tried this VBA macro
Code:
Sub Macro3()
'Select empty rows in range and delete them
    Range("A10:H50").Select 'this range is the differencing
    Selection.SpecialCells(xlCellTypeBlanks).Select 'selecting empty rows
    ActiveWindow.SmallScroll Down:=18 '??????
    Selection.Delete Shift:=xlUp 'search last row with data?
    ActiveWindow.SmallScroll Down:=-27 '????
    Range("A1").Select 'position when VBA is finished
End Sub
But I have a problem when the VBA using the second case.
How to rearrange VBA when I can use for both cases.
How to create a universal range and delete "X?" empty rows that change from case to case.
Reply With Quote