View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default 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