Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Maximum size ? | Excel Discussion (Misc queries) | |||
What is the maximum text size in a cell | Excel Discussion (Misc queries) | |||
Maximum File Size | Excel Discussion (Misc queries) | |||
Maximum file size | Excel Programming | |||
Maximum file size | Excel Programming |