ScriptCrafter Posted December 22, 2009 Share Posted December 22, 2009 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. Link to comment Share on other sites More sharing options...
99ojo Posted December 22, 2009 Share Posted December 22, 2009 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 arrayIt 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 Link to comment Share on other sites More sharing options...
Authenticity Posted December 22, 2009 Share Posted December 22, 2009 ..or use the proper functions: _ExcelReadSheetToArray or UBound, read the help file. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now