ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Referencing Variables (https://www.excelbanter.com/excel-worksheet-functions/6502-referencing-variables.html)

Dwinmac

Referencing Variables
 
I would like to set up two cells that contain a begin number and an end
number representing a range of rows. I want to then concatenate a column
letter onto the start and end number so that I can average the values in the
range.
For Example:
If Column A contains values in rows 1 through 10 I would like to Name
"Start" equal to A11 and put 1 in A11 and Name "End" = A12 and put 10 in A12
and then do something like
=AVERAGE("A" & Start & ":" & "A" & End) to get the average of cells A1
through A10. I get #VALUE! indication

Frank Kabel

Hi
=AVERAGE(INDIRECT("A" & Start & ":" & "A" & End))

and 'name' these cells with 'Insert - Name - Define'

--
Regards
Frank Kabel
Frankfurt, Germany

"Dwinmac" schrieb im Newsbeitrag
...
I would like to set up two cells that contain a begin number and an

end
number representing a range of rows. I want to then concatenate a

column
letter onto the start and end number so that I can average the values

in the
range.
For Example:
If Column A contains values in rows 1 through 10 I would like to Name
"Start" equal to A11 and put 1 in A11 and Name "End" = A12 and put 10

in A12
and then do something like
=AVERAGE("A" & Start & ":" & "A" & End) to get the average of cells

A1
through A10. I get #VALUE! indication




All times are GMT +1. The time now is 04:35 PM.

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