Quote:
Originally Posted by Logit
The following will remove all 'empty' cells in your workbook. Test on a COPY OF YOUR WORKBOOK for safety reasons. Test for file size before then after running macro.
Code:
Sub LipoSuction()
'JBeaucaire (8/3/2009)
Dim LR As Long, LC As Long
Dim ws As Worksheet
For Each ws In Worksheets
LR = ws.Range("A" & ws.Rows.Count).End(xlUp).Row + 1
LC = ws.Cells(1, ws.Columns.Count).End(xlToLeft).Column + 1
'Clear everything below column A last cell and row 1 last cell
ws.Range(ws.Cells(1, LC), ws.Cells(ws.Rows.Count, ws.Columns.Count)).Delete
ws.Range(ws.Cells(LR, 1), ws.Cells(ws.Rows.Count, ws.Columns.Count)).Delete
Next ws
End Sub
|
Thanks, but that isn't addressing my issue. Your procedure clears cells
outside the "used" area. My "problem" cell(s) is
within the used area.
See my reply to PECOFLYER
Cheers
Martin