View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] bart.smissaert@gmail.com is offline
external usenet poster
 
Posts: 18
Default Speeding up Array

Simply loop through your array, for example

dim i as Long
dim lMax as Long

for i = 1 to maxArray
if Arry(1, i) lMax then
lMax = Arry(1, i)
end if
next

RBS


gti_jobert wrote:
Hi all,

Thanks for the replies...have used some of the code posted to speed it
up - no problems with the Array speed now :)

Just one more question tho...

I need to find out the maximum value of Arry(5, 1 to maxArray) - I loop
Week numbers in here. I have been trying to use excels Max function:

EndWeek = Application.Max(val1, val2) - this works when i try it for 2
values but how would I adapt it to feed my array values into it?

thanks again guys for help!


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=551341