Hi, Im using a array in Excel VBA, i got a method which looks at a element no of the array as as a return for that array, i have got it to sort the array, i just need some help to find the middle number (median) of the array.
thanks
Printable View
Hi, Im using a array in Excel VBA, i got a method which looks at a element no of the array as as a return for that array, i have got it to sort the array, i just need some help to find the middle number (median) of the array.
thanks
[vba]
myMid = (UBOUND(myArray) - LBound(myArray) + 1) \ 2
[/vba]
Hi Thanks for the reply, the problem is my array is returning a element no in the array, so when i just called myarray in the median code, it returns a errorQuote:
Originally Posted by xld
this is how it looksCode:Public Property Get GetEndAct(ElementNo As Integer) As Integer
' SORT ARRAY IN ACSCENDING ORDER
SortArray NodeEndActs
GetEndAct = NodeEndActs(ElementNo)
End Property
I have absolutely no idea what all that means.