usedrange is determined by both data, formats and comments.
your code will reset the usedrange only if data was removed
from cells with "standard" style/ general numbers
Debra's code will remove remaining formatting after the last "data".
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
tjtjjtjt wrote :
Is there a functional difference between Debra Dalgleish's code for
this at: http://www.contextures.on.ca/xlfaqApp.html#Unused
And this:
Sub ResetUsedRange()
Dim i As Integer, j As Integer
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
i = w.UsedRange.Rows.Count
j = w.UsedRange.Columns.Count
Next w
End Sub
I don't use UsedRange that often. When I have used it, both
procedures give my identical results. Just curious.