ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveSheet.UsedRange.Rows.Count = 5002? why? (https://www.excelbanter.com/excel-programming/373801-activesheet-usedrange-rows-count-%3D-5002-why.html)

Buffyslay

ActiveSheet.UsedRange.Rows.Count = 5002? why?
 
hi there

my code ActiveSheet.UsedRange.Rows.Count gives 5002, but i am only
using 1 (cannot set to one as in future this will be dynamic...)

any ideas?


WhytheQ

ActiveSheet.UsedRange.Rows.Count = 5002? why?
 
go down to row 5002 and select the entire row and then hit delete.
now try the code again

J



Buffyslay wrote:

hi there

my code ActiveSheet.UsedRange.Rows.Count gives 5002, but i am only
using 1 (cannot set to one as in future this will be dynamic...)

any ideas?



Morris[_2_]

ActiveSheet.UsedRange.Rows.Count = 5002? why?
 

WhytheQ wrote:
go down to row 5002 and select the entire row and then hit delete.
now try the code again

J



Buffyslay wrote:

hi there

my code ActiveSheet.UsedRange.Rows.Count gives 5002, but i am only
using 1 (cannot set to one as in future this will be dynamic...)

any ideas?


you've probably got blank rows = no value, but excel still counts them
(cause there has been some operation made on this row in the past)

go to:
http://www.contextures.com/xlfaqApp.html#Unused



All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com