ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to easily vary (parametrize) array sizes in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/152802-how-easily-vary-parametrize-array-sizes-excel.html)

carolyn

how to easily vary (parametrize) array sizes in Excel?
 
Suppose I have a column of numerical data, say, in Column A.

I want to compute average, e.g., average(A1:A1000).
But sometimes I want to compute average(A23:A1000) or
average(A48:A1000).

Is it possible for me to input the bottom of the range, say "A36", in
another cell, such as C1, and then compute
average(whatever cell is specified in cell C1,A1000)?

How do I do this simply?
MD


BoniM

how to easily vary (parametrize) array sizes in Excel?
 
=AVERAGE(INDIRECT(C1):A1000)

"carolyn" wrote:

Suppose I have a column of numerical data, say, in Column A.

I want to compute average, e.g., average(A1:A1000).
But sometimes I want to compute average(A23:A1000) or
average(A48:A1000).

Is it possible for me to input the bottom of the range, say "A36", in
another cell, such as C1, and then compute
average(whatever cell is specified in cell C1,A1000)?

How do I do this simply?
MD



[email protected]

how to easily vary (parametrize) array sizes in Excel?
 
On Aug 2, 2:39 pm, carolyn wrote:
Suppose I have a column of numerical data, say, in Column A.

I want to compute average, e.g., average(A1:A1000).
But sometimes I want to compute average(A23:A1000) or
average(A48:A1000).

Is it possible for me to input the bottom of the range, say "A36", in
another cell, such as C1, and then compute
average(whatever cell is specified in cell C1,A1000)?

How do I do this simply?


If you have this in column A...

1
2
3
4
5
6
7
8
9
10


Full

=ADDRESS(1,1,1,1)
=ADDRESS(10,1,1,1)
=AVERAGE(INDIRECT(A15,1):INDIRECT(A16,1))


Partial
6
=ADDRESS(A21,1,1,1)
=ADDRESS(10,1,1,1)
=AVERAGE(INDIRECT(A22,1):INDIRECT(A23,1))

....you'll see this:

1
2
3
4
5
6
7
8
9
10


Full

$A$1
$A$10
5.5


Partial
6
$A$6
$A$10
8

MD




Roger Govier[_3_]

how to easily vary (parametrize) array sizes in Excel?
 
Hi Carolyn

One way
=AVERAGE(INDEX(A:A,C1):A1000)

--
Regards
Roger Govier



"carolyn" wrote in message
oups.com...
Suppose I have a column of numerical data, say, in Column A.

I want to compute average, e.g., average(A1:A1000).
But sometimes I want to compute average(A23:A1000) or
average(A48:A1000).

Is it possible for me to input the bottom of the range, say "A36", in
another cell, such as C1, and then compute
average(whatever cell is specified in cell C1,A1000)?

How do I do this simply?
MD





All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com