I like to add this
Use a on error in the code, this avoid a error if there are no blanks
On Error Resume Next
' code
On Error GoTo 0
Note: The limit of SpecialCells is 8192 separate areas
--
Regards Ron de Bruin
http://www.rondebruin.nl
"bernard" wrote in message ...
Excellent, worked a treat! Thanks again.
"Bernie Deitrick" wrote:
bernard,
Sub DeleteRows()
Range("D:D").SpecialCells(xlCellTypeBlanks).Entire Row.Delete
End Sub
This will only work if the cells are truly blank - not filled with a formula that returns "".
HTH,
Bernie
MS Excel MVP
"bernard" wrote in message
...
I need to format a sheet every month into a format that can be imported into
our accounting system - I plan to do this using macros.
The sheet contains a number of rows that are not to be imported into the
system and I wish to delete these - the rows to be deleted are those where
column D contains no value.
The spreadsheet has a different number of rows each month. Can anyone advise
how this can best be done.
Thanks in advance.