Multiple arrays in Median function -- VBA
Hi Scott
to be honest I would try something like the following:
application.screenupdating=false
with activesheet.range("C1")
.formulaarray="=MEDIAN(IF((A1:A100)*(A1:A10<5),B1 :B10)"
.value=.value
end with
application.screenupdating=true
--
Regards
Frank Kabel
Frankfurt, Germany
Scott P wrote:
I am trying to implement a function that I built using Excel in VBA.
My function is: {=MEDIAN(IF((A1:A100)*(A1:A10<5),B1:B10)} This
function tells me: calculate the median for the values in the range
B1:B10 for which the corresponding values in A1:A10 are greater than
0 and less than 5.
How can I enable the same functionality in VBA?
|