ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help needed with a formula, please. (https://www.excelbanter.com/excel-worksheet-functions/185195-help-needed-formula-please.html)

Lissa

Help needed with a formula, please.
 
How do I write a formula to add the alternating cells in a column? It is a
rather large spreadsheet, so entering each cell individually would be rather
cumbersome and won't fit. Any insight would be greatly appreciated.

T. Valko

Help needed with a formula, please.
 
This formula will sum every other row A2, A4, A6, A8, A10:

=SUMPRODUCT(--(MOD(ROW(A2:A10)-ROW(A2),2)=0),A2:A10)

This formula will sum every other row A3, A5, A7, A9:

=SUMPRODUCT(--(MOD(ROW(A2:A10)-ROW(A2),2)=1),A2:A10)

--
Biff
Microsoft Excel MVP


"Lissa" wrote in message
...
How do I write a formula to add the alternating cells in a column? It is
a
rather large spreadsheet, so entering each cell individually would be
rather
cumbersome and won't fit. Any insight would be greatly appreciated.




ryguy7272

Help needed with a formula, please.
 
Found this online a while back...not sure where though:

Use these formulas when the data DOES start in row 1.
To start in row N, and sum rows N, 2N, 3N, etc, use
=SUM(IF(MOD(ROW($A$1:$A$20),$D$1)=0,$A$1:$A$20,0))


To start in row 1, and sum rows 1, 1+N, 1+(2N),etc use
=SUM(IF(MOD(ROW($A$1:$A$20)-1,$D$1)=0,$A$1:$A$20,0))

Maybe it came from he
http://www.ozgrid.com/Excel/sum-every-2nd-nth-cell.htm


Regards,
Ryan--


--
RyGuy


"Lissa" wrote:

How do I write a formula to add the alternating cells in a column? It is a
rather large spreadsheet, so entering each cell individually would be rather
cumbersome and won't fit. Any insight would be greatly appreciated.



All times are GMT +1. The time now is 05:34 PM.

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