I need to have a formula that can add a row of cells with a variable
number of colmns. Columns will be added and deleted everyday, so the
formula needs to have a variable range.
I hope this is clear.
Thanks,
Bernie
Bob Phillips - 24 Jan 2007 16:42 GMT
In a1 say
=SUM(OFFSET(B1,,,1,COUNT(B1:M1)))
adjust the column M to the last possible column.

Signature
---
HTH
Bob
(change the xxxx to gmail if mailing direct)
>I need to have a formula that can add a row of cells with a variable
> number of colmns. Columns will be added and deleted everyday, so the
[quoted text clipped - 4 lines]
> Thanks,
> Bernie
Harlan Grove - 24 Jan 2007 18:07 GMT
"Bernie" <b...@aol.com> wrote...
>I need to have a formula that can add a row of cells with a variable
>number of colmns. Columns will be added and deleted everyday, so the
>formula needs to have a variable range.
Another alternative. If the leftmost cell would never vary, so just the
number of columns would vary, try something like
=SUM(X3:INDEX(X3:IV,n))
where n is the number of columns. You're unclear about how the number
of columns would be determined.
If the leftmost cell could also vary, try something like
=SUM(INDEX(3:3,k):INDEX(3:3,n))
where k and n are respectively the column numbers of the leftmost and
rightmost cells in the range to be summed.
In both formulas I used row 3, and in the first I began in column X.
Modify to suit your needs.