ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Summing cell totals across columns (https://www.excelbanter.com/excel-worksheet-functions/116610-summing-cell-totals-across-columns.html)

[email protected]

Summing cell totals across columns
 
In the same row, I need to sum cell totals across 60 columns. Each
cell total is an equidistant 4 columns to the right of the previous
cell total. The formula needs to reside in the same row in the last
column after all of the totals.


I have tried =sum(offset(A4:mm4,0,4)), but this doesn't work. (It sums

the totals, but also adds the data between the cell totals; perhaps I'm

not using this formula correctly?). Any suggestions?


Bob Phillips

Summing cell totals across columns
 
=SUMPRODUCT(--(MOD(COLUMN(A4:BM4),4)=1),A4:BM4)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
In the same row, I need to sum cell totals across 60 columns. Each
cell total is an equidistant 4 columns to the right of the previous
cell total. The formula needs to reside in the same row in the last
column after all of the totals.


I have tried =sum(offset(A4:mm4,0,4)), but this doesn't work. (It sums

the totals, but also adds the data between the cell totals; perhaps I'm

not using this formula correctly?). Any suggestions?




goodoldude

Summing cell totals across columns
 
Bob,
Thank you! Your recommended formula worked perfectly.
-Excelguy-

Bob Phillips wrote:
=SUMPRODUCT(--(MOD(COLUMN(A4:BM4),4)=1),A4:BM4)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
In the same row, I need to sum cell totals across 60 columns. Each
cell total is an equidistant 4 columns to the right of the previous
cell total. The formula needs to reside in the same row in the last
column after all of the totals.


I have tried =sum(offset(A4:mm4,0,4)), but this doesn't work. (It sums

the totals, but also adds the data between the cell totals; perhaps I'm

not using this formula correctly?). Any suggestions?




All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com