G
GS Brown
Is there a way to use the offset function (or another function) as a way
to supply an expanding range to other functions like 'average'? For my
purposes, there may be multiple series of numbers within say a column,
with each 'series' (i.e. set of contiguous rows) separated by a few
blank cells. The objective of the function would be to supply a limited
set of numbers (which can expand) to the function whose result is the
main interest. For example, within column D, I might have rows 5-10
representing adult male fish weights, rows 15-20 representing adult
female fish weights and rows 25-30 representing juvenile fish weights.
The cells between each set of data are blank. I imagine that I'd have a
separate average function for each of the three 'sets' of data using the
offset function as a way to define each set, each of which can expand.
I've tried something like the following to get a result for each set of
data, say the one in rows 5-10:
=average(offset($D$4,1,0,counta($D:$D),1))
I expected that the offset function would return the range beginning in
cell D5 extending down column D until the first blank cell (D11) is
encountered. Instead, the offset function appears to return all of
column D. What am I missing about the offset function? How else can I
specify a range of values that can expand to another function like
average?
I want to avoid the use of Named Ranges because I'd have a million of
them. Well, maybe that's an exaggeration but you'll likely know what I
mean.
Any suggestions will be greatly appreciated.
Thanks in advance,
Gayle
***** Posted via: http://www.ozgrid.com
Excel Templates, Training & Add-ins.
Free Excel Forum http://www.ozgrid.com/forum *****
to supply an expanding range to other functions like 'average'? For my
purposes, there may be multiple series of numbers within say a column,
with each 'series' (i.e. set of contiguous rows) separated by a few
blank cells. The objective of the function would be to supply a limited
set of numbers (which can expand) to the function whose result is the
main interest. For example, within column D, I might have rows 5-10
representing adult male fish weights, rows 15-20 representing adult
female fish weights and rows 25-30 representing juvenile fish weights.
The cells between each set of data are blank. I imagine that I'd have a
separate average function for each of the three 'sets' of data using the
offset function as a way to define each set, each of which can expand.
I've tried something like the following to get a result for each set of
data, say the one in rows 5-10:
=average(offset($D$4,1,0,counta($D:$D),1))
I expected that the offset function would return the range beginning in
cell D5 extending down column D until the first blank cell (D11) is
encountered. Instead, the offset function appears to return all of
column D. What am I missing about the offset function? How else can I
specify a range of values that can expand to another function like
average?
I want to avoid the use of Named Ranges because I'd have a million of
them. Well, maybe that's an exaggeration but you'll likely know what I
mean.
Any suggestions will be greatly appreciated.
Thanks in advance,
Gayle
***** Posted via: http://www.ozgrid.com
Excel Templates, Training & Add-ins.
Free Excel Forum http://www.ozgrid.com/forum *****