Used Range
I have date in the first 50 rows of a worksheet.
If I delete rows 10 through 100 by using either: rows("10:100").select selection.delete or rows("10:100").select selection.clear then I should only have data in the first 9 rows. I have a function that is relying on the used range. I would expect the following to return an address that ends in row 9. However it returns an address that ends in row 100. UsedRange.SpecialCells(xlCellTypeLastCell).Address Any ideas why row 100 is still in the used range??? TIA... |
Used Range
The UsedRange doesn't get updated when data is deleted.
Take a look a t Debra Dalgleish's FAQ on this at http://www.contextures.com/xlfaqApp.html#Unused -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Hawk" wrote in message ... I have date in the first 50 rows of a worksheet. If I delete rows 10 through 100 by using either: rows("10:100").select selection.delete or rows("10:100").select selection.clear then I should only have data in the first 9 rows. I have a function that is relying on the used range. I would expect the following to return an address that ends in row 9. However it returns an address that ends in row 100. UsedRange.SpecialCells(xlCellTypeLastCell).Address Any ideas why row 100 is still in the used range??? TIA... |
All times are GMT +1. The time now is 10:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com