I have a 2 dimensional array that holds an error code and a value associated with the code.
ReDim ErrorCodeArray(LearnerCount - 1, 9 To 32)
I am populating this ok.
I am having a problem extracting the maximum value in the data set.
'for each learner row that exists
For arrayLoop = 0 To LearnerCount - 1
'navigate down this column
For Each percentRange In Range("AH11:AH46")
'get the maximum value from the array
Pval = WorksheetFunction.Max(ErrorCodeArray())
'populate the column
Worksheets("Auditchecklist").Range(percentRange.Offset(arrayLoop, 0).Value) = Pval
'move down a row in the column
Next percentRange
'move to the next row in array
Next arrayLoop
this: Max(ErrorCodeArray()) returns the max value from all the array
if i try ErrorCodeArray(arrayLoop)
it squeels for more data
if i put ErrorCodeArray(arrayLoop, another value)
it only returns one value
How do I pass one whole row ie max(ErrorCodeArray(arrayLoop, 9 to 32))
Bookmarks