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
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]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
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 errorOriginally Posted by xld
this is how it looksPublic 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.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber