Possible to create a range string for a worksheet function?

  • Thread starter Thread starter Android
  • Start date Start date
A

Android

This is part of my search to resolve a problem I posted earlier. An answer
to the following would problem solve that problem....

If I want to calculate a sum from cell X to a variable cell (which I will
calculate). Is this possible via an Excel function?

E.g., something like =Sum(A2:A&(D1+4))

In this case if D1 contained 5, the result would be =SUM(A2:A9).

I know the above does not work. Is there a way to do something like this.

Regards,

Android.
 
You can use either offset or indirect
here is indirect

=SUM(A2:INDIRECT("A"&(D1+4)))

--


For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
That's fantastic. Thank you both. I ended up using the OFFSET option
because I actually needed to sum across columns. OFFSET seems the most
intuitive for it.

Android.
 
The INDEX idiom works also with horizontal references like 1:1 and it's
non-volatile, while OFFSET and INDIRECT are.
 
Back
Top