#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Arrays

Hello

I have a an array called myarray(50) in vb

I am feeding numbers from a table into the array through a loop. How do i then get the highest number out of the array

Thanks in advance
James
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Arrays

James,

application.worksheetfunction.Max(myarray)

Cheers, Pete.

-----Original Message-----
Hello,

I have a an array called myarray(50) in vba

I am feeding numbers from a table into the array through

a loop. How do i then get the highest number out of the
array?

Thanks in advance,
James
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Arrays

Hi
AFAIK there's no build-in function for this. So you have
to loop through your array. One workaround could be to put
your array into a (hidden) worksheet range and use the
application.worksheetfunction.max function on this range
-----Original Message-----
Hello,

I have a an array called myarray(50) in vba

I am feeding numbers from a table into the array through

a loop. How do i then get the highest number out of the
array?

Thanks in advance,
James
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Arrays

Hello James

Maxvalue = Application.WorksheetFunction.Max(myarray)

will do the trick.


--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"JAmes L" skrev i en meddelelse
...
Hello,

I have a an array called myarray(50) in vba

I am feeding numbers from a table into the array through a loop. How do i

then get the highest number out of the array?

Thanks in advance,
James



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
Use of arrays DKS Excel Worksheet Functions 1 November 30th 06 08:38 PM
Use of arrays Dave F Excel Worksheet Functions 0 November 30th 06 04:26 PM
two arrays Jerry Kinder New Users to Excel 4 February 26th 06 08:29 AM
Need help with arrays (I think) rbhedal Excel Worksheet Functions 3 October 19th 05 07:24 AM
arrays again RobcPettit Excel Programming 3 January 24th 04 10:33 PM


All times are GMT +1. The time now is 10:19 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"