Sign in to follow this  
Followers 0
ScriptCrafter

ExcelReadSheetArray (_ArrayMaxIndex)

3 posts in this topic

Hello,

Sorry for any questions that you may regard as SPAM, but I do spend a fair amount of time looking before I post.

I cant seem to get a Max Indes for a the last value in a row and column of an excel sheet.

It appears that the ArrayMaxIndex doesnt return a value for a 2D array.

Any help is much appreciated.

Share this post


Link to post
Share on other sites



Hi,

as it is mentioned in helpfile:

Failure: -1, sets @error to:

1 - $avArray is not an array

2 - $iStart is greater than $iEnd

3 - $avArray is not a 1 dimensional array

It works only with 1 dimensional array. Code to proof:

_ArrayMaxIndex($array)
If @error Then MsgBox (0,"Error Number.....", @error); MsgBox should show a value of 3.

I think you have to code yourself to get the highest value of your array....

;-))

Stefan

Share this post


Link to post
Share on other sites

..or use the proper functions: _ExcelReadSheetToArray or UBound, read the help file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0