Hi,
New to the forum. I'm trying to set up a formula that will average some numbers. The numbers I want it to average will be specified via the indirect function. The range of numbers to average may not be contiguous, so there may be numbers in a1:a5,a8:a10, for example. I want the formula to have the capability to average as many as 5 different subranges (where a subrange in the previous example is a1:a5). So I've set up this formula
=AVERAGE(INDIRECT(A342):INDIRECT(A343),IF(OR(A344="",A345=""),"",INDIRECT(A344):INDIRECT(A345)))
And this sort of works, but it only has 2 different subranges and it doesn't like it if a344 or a345 is blank. I know that the range to average will have at least two values - specified by INDIRECT(A342):INDIRECT(A343). I had hoped that I'd just be able to repeat the if statement 4 times to give the 5 subrange capability, but something isn't right.
I wondered if it needed a ctrl-shift-enter, but that didn't do it.
Thanks!
Tim
New to the forum. I'm trying to set up a formula that will average some numbers. The numbers I want it to average will be specified via the indirect function. The range of numbers to average may not be contiguous, so there may be numbers in a1:a5,a8:a10, for example. I want the formula to have the capability to average as many as 5 different subranges (where a subrange in the previous example is a1:a5). So I've set up this formula
=AVERAGE(INDIRECT(A342):INDIRECT(A343),IF(OR(A344="",A345=""),"",INDIRECT(A344):INDIRECT(A345)))
And this sort of works, but it only has 2 different subranges and it doesn't like it if a344 or a345 is blank. I know that the range to average will have at least two values - specified by INDIRECT(A342):INDIRECT(A343). I had hoped that I'd just be able to repeat the if statement 4 times to give the 5 subrange capability, but something isn't right.
I wondered if it needed a ctrl-shift-enter, but that didn't do it.
Thanks!
Tim