Try this: =SUM(OFFSET(A1;1;0;1;$A$1))
Kirill S. Palagin wrote:
Hello.
I need to sum the range of cells with the range itself depending on
parameter, that is
if $A$1 is 1, then Sum(A2:A2),
if $A$1 is 2, then Sum(A2:B2),
if $A$1 is 3, then Sum(A2:C2),
etc.
So far I see very inelegant solution involving IF with each item to be
summed.
Is there a better way?
Thanks a lot.
WBR,
K. Palagin.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Send instant messages to your online friends http://au.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]