Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How to sum every 2nd or 3rd row on the easiest way?
|
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Try this =SUM(IF(MOD(ROW($A$1:$A$100),3)=0,$A$1:$A$100,0)) It's an arry so commit with Ctrl+Shift+Enter Change the 3 to a 2 to do every second row Mike "Mario" wrote: How to sum every 2nd or 3rd row on the easiest way? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Summing to any Nth value is quite easy in Excel:
http://www.mcgimpsey.com/excel/formu...meverynth.html Also, from he http://www.cpearson.com/excel/excelf.htm Summing Every Nth Value You can easily sum (or average) every Nth cell in a column range. For example, suppose you want to sum every 3rd cell. Suppose your data is in A1:A20, and N = 3 is in D1. The following array formula will sum the values in A3, A6, A9, etc. =SUM(IF(MOD(ROW($A$1:$A$20),$D$1)=0,$A$1:$A$20,0)) If you want to sum the values in A1, A4, A7, etc., use the following array formula: =SUM(IF(MOD(ROW($A$1:$A$20)-1,$D$1)=0,$A$1:$A$20,0)) If your data ranges does not begin in row 1, the formulas are slightly more complicated. Suppose our data is in B3:B22, and N = 3 is in D1. To sum the values in rows 5, 8, 11, etc, use the following array formula: =SUM(IF(MOD(ROW($B$3:$B$22)-ROW($B$3)+1,$D$1)=0,$B$3:B$22,0)) If you want to sum the values in rows 3, 6, 9, etc, use the following array formula: =SUM(IF(MOD(ROW($B$3:$B$22)-ROW($B$3),$D$1)=0,$B$3:B$22,0)) Download a workbook illustrating these formulas. Regards, Ryan-- -- RyGuy "Mike H" wrote: Hi, Try this =SUM(IF(MOD(ROW($A$1:$A$100),3)=0,$A$1:$A$100,0)) It's an arry so commit with Ctrl+Shift+Enter Change the 3 to a 2 to do every second row Mike "Mario" wrote: How to sum every 2nd or 3rd row on the easiest way? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|