variable cell references in function

  • Thread starter Thread starter Dan Condie
  • Start date Start date
D

Dan Condie

I need to change the number of cells being added depending
on the number entered into cell A1.

For instance,

If cell A1 says 10, I want cell B1 to @sum(c1:c10)
If cell A1 says 35, I want cell B1 to @sum(c1:c35)

I know there's an easy way to do it, but just don't know
that easy way.

thanks
 
I need to change the number of cells being added depending
on the number entered into cell A1.

For instance,

If cell A1 says 10, I want cell B1 to @sum(c1:c10)
If cell A1 says 35, I want cell B1 to @sum(c1:c35)
...

Someone else may give an answer using INDIRECT. I prefer OFFSET for this sort of
thing. And drop the '@' (you an old 123 or Quattro Pro user?).

=SUM(OFFSET(C1,0,0,A1,1))
 
Back
Top