ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Having cell contents enter into cell referenced (https://www.excelbanter.com/excel-discussion-misc-queries/76495-having-cell-contents-enter-into-cell-referenced.html)

elbows

Having cell contents enter into cell referenced
 

I couldn't explain it very well in the title, but thanks for reading
anyway.

I'm sure that there are other ways to do this where this question would
be moot, but want I want to do is use the actual contents of cells in a
cell reference.

For example,
Rhode Island starts at row 2 and goes to row 373.
I have a row describing RI where there is a cell with a value of 2 and
another with a value of 373.
Then, I might want another cell that does =average(c2:c373) but I don't
know how to get the 2 and 373 into the formula.

The reason I want to do it this way is that my data are 373 rows X 50
states and I want another sheet that answers all the questions I have
to have 1 row for each state.

Thanks.


--
elbows
------------------------------------------------------------------------
elbows's Profile: http://www.excelforum.com/member.php...fo&userid=7449
View this thread: http://www.excelforum.com/showthread...hreadid=521090


Ron Rosenfeld

Having cell contents enter into cell referenced
 
On Fri, 10 Mar 2006 09:44:27 -0600, elbows
wrote:


I couldn't explain it very well in the title, but thanks for reading
anyway.

I'm sure that there are other ways to do this where this question would
be moot, but want I want to do is use the actual contents of cells in a
cell reference.

For example,
Rhode Island starts at row 2 and goes to row 373.
I have a row describing RI where there is a cell with a value of 2 and
another with a value of 373.
Then, I might want another cell that does =average(c2:c373) but I don't
know how to get the 2 and 373 into the formula.

The reason I want to do it this way is that my data are 373 rows X 50
states and I want another sheet that answers all the questions I have
to have 1 row for each state.

Thanks.


IF the start row is in A1, and the last row is in B1, and the data is in column
C, then:

=AVERAGE(OFFSET(C1,A1-1,0,B1-A1+1))

should work
--ron


All times are GMT +1. The time now is 11:12 PM.

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