Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default sum every nth cell in a row

Hi

I am trying to adapt Bob Phillips formula

=SUMPRODUCT((B2:B32)*(MOD(ROW(B2:B32)-ROW(B2),n)+1=m))

I have cells, e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15, etc
I want to sum, e5,e9,e13 etc
I will need to adapt this in another cell to add, e6,e10,e14 etc and
therefore need to understand the N + M value

I have entered the formula below in cell c5, but get 0. Have entered as
array formula
{=SUMPRODUCT((E5:AY5)*(MOD(ROW(E5:AY5)-ROW(B2),4)+1=F5))}

What am I doing wrong

Help appriciated

Brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200803/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default sum every nth cell in a row

I have used this formula for summing up the 3rd row.

=SUM(IF(MOD(ROW($O$3:$O$425),$O$435)=0,$O$3:$O$425 ,0))

Cell O435's value is 3 in this case.

So it takes the sum of the cell if the remainder or the row# divided by 3
(cell O435) of the is equal to 0. You should be able to use this and assign
an unused cell to 4, and use that as your divisor. and you can change the =0
to be anything between 0 and 1 number less than you are using as you divisor.

Hope this helps.


"BNT1 via OfficeKB.com" wrote:

Hi

I am trying to adapt Bob Phillips formula

=SUMPRODUCT((B2:B32)*(MOD(ROW(B2:B32)-ROW(B2),n)+1=m))

I have cells, e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15, etc
I want to sum, e5,e9,e13 etc
I will need to adapt this in another cell to add, e6,e10,e14 etc and
therefore need to understand the N + M value

I have entered the formula below in cell c5, but get 0. Have entered as
array formula
{=SUMPRODUCT((E5:AY5)*(MOD(ROW(E5:AY5)-ROW(B2),4)+1=F5))}

What am I doing wrong

Help appriciated

Brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200803/1


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Yuvraj Excel Discussion (Misc queries) 0 June 26th 09 06:01 PM
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 [email protected] Excel Worksheet Functions 1 August 22nd 08 02:04 AM
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON CAPTGNVR Excel Programming 2 July 8th 07 04:18 PM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM


All times are GMT +1. The time now is 01:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"