View Full Version : arrays
Rambo
02-18-2008, 03:58 AM
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
Bob Phillips
02-18-2008, 04:09 AM
myMid = (UBOUND(myArray) - LBound(myArray) + 1) \ 2
Rambo
02-18-2008, 04:11 AM
myMid = (UBOUND(myArray) - LBound(myArray) + 1) \ 2
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 error
Public Property Get GetEndAct(ElementNo As Integer) As Integer
' SORT ARRAY IN ACSCENDING ORDER
SortArray NodeEndActs
GetEndAct = NodeEndActs(ElementNo)
End Property
this is how it looks
Bob Phillips
02-18-2008, 06:05 AM
I have absolutely no idea what all that means.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.