Formula

B

Bernie

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
 
B

Bob Phillips

In a1 say

=SUM(OFFSET(B1,,,1,COUNT(B1:M1)))

adjust the column M to the last possible column.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
H

Harlan Grove

Bernie said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top