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

You code worked ok for me also.
One small idea would be to search 256 columns, vs. 64000 Rows.

Sub Demo()
Dim Col As Collection
Dim C As Long
Dim n As Long

Set Col = New Collection
ActiveSheet.UsedRange
For C = 1 To Cells.SpecialCells(xlCellTypeLastCell).Column
n = WorksheetFunction.CountA(Columns(C))
If n 0 Then Col.Add C, CStr(C)
Next
MsgBox Col(Col.Count - 2)
End Sub

There are other ways with "Find", but this was quick n dirty.
--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Myles" wrote in
message ...

i was just wondering if it was the amount of memory limiting you to that
number of elements

Yes and No! Yes because there is an inherent constraint in Excel which
does not allow you to exceed that magic number of 5460. In that wise,
Excel's resources put a break on how far you can go.

On the other hand, as you well know, there are instances where an
operation is not subjected to any computational limitation per se
except of course limitation imposed by available "system resources"
which vary from one window version to another, to say nothing of
varying hardware specifications.
The Array limit is a defined limit and is not governed by overall
resource bank


Myles


--
Myles
------------------------------------------------------------------------
Myles's Profile:
http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=571892



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
Is there an array size limit for MMULT or MINVERSE in excel 2007? jimr315 Excel Worksheet Functions 4 February 7th 07 10:48 PM
Array size limit when using WorksheetFunction.Transpose? Ken Johnson Excel Programming 5 August 7th 06 11:21 PM
Cell size? Or size limit for Text data type? CClem Excel Discussion (Misc queries) 0 April 21st 06 04:09 PM
what is array size limit in VBA? Tony Excel Programming 1 January 21st 06 08:02 PM
limit to possible array size? rachel Excel Programming 4 November 11th 04 02:41 AM


All times are GMT +1. The time now is 11:39 AM.

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

About Us

"It's about Microsoft Excel"