I found in an old thread here a macro deleting blank rows in an excel sheet, changing "pseudo blanks" into real blanks first. It was this little script:
Sub RemoveEmptyRows()
On Error Resume Next
With Range("B300:B1000")
.Value = .Value
.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End With
End Sub
When I use this in a sample excel file, that works perfectly. However in the sheet I want to use it, nothing happens. I used PasteSpecial xlPasteValues
to fill some cells, so I think that's the point again why it does not work. Somebody has any suggestion how to handle with this issue? Thanks for your help
Sub RemoveEmptyRows()
On Error Resume Next
With Range("B300:B1000")
.Value = .Value
.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End With
End Sub
When I use this in a sample excel file, that works perfectly. However in the sheet I want to use it, nothing happens. I used PasteSpecial xlPasteValues
to fill some cells, so I think that's the point again why it does not work. Somebody has any suggestion how to handle with this issue? Thanks for your help