View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default sum every nth cell in a row

entered with shift+ctl+ent

Doesn't need to be array entered but that won't cause an error. Just ENTER
will work.

Keep getting #Value! error


Are there any #VALUE! errors already in the range?

Here's a small sample file that demonstrates this.

xSumNth.xls 14kb

http://cjoint.com/?dvxr6QVxsY


--
Biff
Microsoft Excel MVP


"BNT1 via OfficeKB.com" <u19326@uwe wrote in message
news:81816da88aaa2@uwe...
Keep getting #Value! error

copied and pasted in c5, and entered with shift+ctl+ent

=SUMPRODUCT(--(MOD(ROW(E5:E100),4)=1),E5:E100)


Any ieas?



T. Valko wrote:
need to understand the N + M value


N = divisor used in the MOD function
M = mod

For example:

Using cell E5:

MOD(ROW(E5),n)=m

MOD(ROW(E5),4)=1

I want to sum, e5,e9,e13 etc


=SUMPRODUCT(--(MOD(ROW(E5:E100),4)=1),E5:E100)

I will need to adapt this in another cell to add, e6,e10,e14 etc


=SUMPRODUCT(--(MOD(ROW(E5:E100),4)=2),E5:E100)

Sorry Posted in wrong group earlier

[quoted text clipped - 18 lines]

Brian


--
Message posted via http://www.officekb.com