Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Maximum Range size?

I have a spreadsheet with 27,000+ rows on it.
I am using a macro to colour code the rows depending on criteria.

However, I notice when I set my range it is only going up to 7589!

Is there a maximum number of rows in a range and can yo tell me what m
problem might be from my code below. Perhaps im not setting the rang
correctly?

[vb]
Dim RowInx As Long
For RowInx = Range("A1").End(xlDown).Row To 2 Step -1
Dim sreNum As Integer
sreNum = Month(Cells(RowInx, "O").Value)

'do some stuff that you dont need to see!

Next
[/vb]

Like I said there are over 27,000 rows on the sheet but the range i
only seeing 7589!

Help

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Maximum Range size?

Hi Andy,

Try: For Cells(Rows.Count,"A").End(xlUp).Row

Using your End(xlDown) method will fail to select the last row if there are
any intervening blank cells - check cell A7589 and it will probably prove to
be blank.

---
Regards,
Norman

"andycharger " wrote in message
...
I have a spreadsheet with 27,000+ rows on it.
I am using a macro to colour code the rows depending on criteria.

However, I notice when I set my range it is only going up to 7589!

Is there a maximum number of rows in a range and can yo tell me what my
problem might be from my code below. Perhaps im not setting the range
correctly?

[vb]
Dim RowInx As Long
For RowInx = Range("A1").End(xlDown).Row To 2 Step -1
Dim sreNum As Integer
sreNum = Month(Cells(RowInx, "O").Value)

'do some stuff that you dont need to see!

Next
[/vb]

Like I said there are over 27,000 rows on the sheet but the range is
only seeing 7589!

Help!


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Maximum size ? Gustav Excel Discussion (Misc queries) 1 March 6th 06 03:05 PM
What is the maximum text size in a cell ChaimB Excel Discussion (Misc queries) 4 February 20th 05 06:24 PM
Maximum File Size Lynn Excel Discussion (Misc queries) 1 December 17th 04 03:38 PM
Maximum file size obt Excel Programming 1 November 10th 03 06:30 AM
Maximum file size Frank Isaacs Excel Programming 0 September 8th 03 11:11 PM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"