Formula for adding cells (with a row interval)

Jojo86

New Member
Joined
Jul 24, 2023
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi,

Some months ago I had a similar question and it was solved here: Formula for adding cells (with a 5 row interval)
using this formula: =SUM(IF(MOD(ROW('21 SUP'!A15:A100),5)=0,'21 SUP'!A15:A100,0))

My question this time is this:

I have a lot of columns and in each column I have to add several cells (with a 1 row interval and a 4 row internal):

Example:
Column A1 ='21 SUP'!A1+'21 SUP'!A5+'21 SUP'!A6+'21 SUP'!A10+'21 SUP'!A11+'21 SUP'!A15+'21 SUP'!A16 etc
Column B1 ='21 SUP'!B1+'21 SUP'!B5+'21 SUP'!B6+'21 SUP'!B10+'21 SUP'!B11+'21 SUP'!B15+'21 SUP'!B16 etc

-> Can you please give me a formula I can use that can be used in different columns?

Thanks everyone
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try this?
Excel Formula:
=SUM(IF(MOD(ROW('21 SUP'!A1:A100),5)={0,1},'21 SUP'!A1:A100,0))
 
Upvote 0
I would suggest adding some insurance so that if any rows were subsequently added at the top of '21 SUP' the formula would still add the same values.
Excel Formula:
=SUM(IF(MOD(SEQUENCE(100),5)={0,1},'21 SUP'!A2:A101,0))
 
Upvote 0
Thanks everyone. I changed the , to ; however I'm getting 0 as a result. Am i doing something wrong?
 
Upvote 0
Could you give us some small sample data and expected results with XL2BB?
 
Upvote 0
Ok I managed :)

First one is what I want fixed.
Second and third are where the data is from.

Thanks

Book1
ABC
1June 2022July 2022
221 SUP37229
331 CMSW7069
Help
Cell Formulas
RangeFormula
B2:C2B2='21 SUP'!X11+'21 SUP'!X12+'21 SUP'!X16+'21 SUP'!X17+'21 SUP'!X21+'21 SUP'!X22+'21 SUP'!X26+'21 SUP'!X27+'21 SUP'!X31+'21 SUP'!X32+'21 SUP'!X36+'21 SUP'!X37+'21 SUP'!X41+'21 SUP'!X42+'21 SUP'!X46+'21 SUP'!X47+'21 SUP'!X51+'21 SUP'!X52+'21 SUP'!X56+'21 SUP'!X57+'21 SUP'!X61+'21 SUP'!X62+'21 SUP'!X66+'21 SUP'!X67+'21 SUP'!X71+'21 SUP'!X72+'21 SUP'!X76+'21 SUP'!X77
B3:C3B3='31 CMSW'!X11+'31 CMSW'!X12+'31 CMSW'!X16+'31 CMSW'!X17+'31 CMSW'!X21+'31 CMSW'!X22+'31 CMSW'!X26+'31 CMSW'!X27+'31 CMSW'!X31+'31 CMSW'!X32+'31 CMSW'!X36+'31 CMSW'!X37+'31 CMSW'!X41+'31 CMSW'!X42+'31 CMSW'!X46+'31 CMSW'!X47+'31 CMSW'!X51+'31 CMSW'!X52+'31 CMSW'!X56+'31 CMSW'!X57+'31 CMSW'!X61+'31 CMSW'!X62+'31 CMSW'!X66+'31 CMSW'!X67+'31 CMSW'!X71+'31 CMSW'!X72+'31 CMSW'!X76+'31 CMSW'!X77


Book1
XY
10June 2022July 2022
11122
12254
13
14
15
162377
171176
21 SUP


Book1
XY
10June 2022July 2022
111010
121222
13
14
15
164433
1744
31 CMSW
 
Upvote 0
As per my earlier suggestion:
Book1
ABC
1Jun-22Jul-22
221 SUP37229
331 CMSW7069
Help
Cell Formulas
RangeFormula
B2:C2B2=SUM(IF(MOD(ROW('21 SUP'!X10:X100),5)={1,2},'21 SUP'!X10:X100,0))
B3:C3B3=SUM(IF(MOD(ROW('31 CMSW'!X10:X100),5)={1,2},'31 CMSW'!X10:X100,0))
 
Upvote 0
I pasted it. And had to change 3 of the , to ; and I get 0 as a result

Mr.Excel (2).xlsx
ABC
1June 2022July 2022
221 SUP00
331 CMSW00
Help
Cell Formulas
RangeFormula
B2:C2B2=SUM(IF(MOD(ROW('21 SUP'!X10:X100),5)={1.2},'21 SUP'!X10:X100,0))
B3:C3B3=SUM(IF(MOD(ROW('31 CMSW'!X10:X100),5)={1.2},'31 CMSW'!X10:X100,0))


And this shows the formula i have as when i pasted the above {1,2} is showing as {1.2}

1697633139963.png
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,051
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top