Add a constant number to the cell row references of a SUM function.

greenfortyguy

New Member
Joined
Sep 7, 2017
Messages
13
Hello,

I am looking for a way to increase the cell row number of a SUM function by 4 as I copy the formula.

The SUM is across two sheets.

The formula in my first cell (G7, on a sheet called '60 min') is:

=SUM('15 min'!G7:G10)

I want the formula to copy into G8 on the '60 min' sheet as:

=SUM('15 min'!G11:G14)

And into G9 on the '60 min' sheet as:

=SUM('15 min'!G15:G18)

I imagine it is something to do with the OFFSET function but I haven't had any luck with this.

Any help would be much appreciate, thanks.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Welcome to the board. I think INDIRECT may work better, e.g.
Code:
=SUM(INDIRECT("'15 Min'!G"&row()+4*(row()-7) & ":G" & row()+4*(row()-7)+3&")")
Untested
 
Last edited:
Upvote 0
try this in G7 and copy down

Code:
=SUM(OFFSET('15 min'!$G$7,(ROW('15 min'!G7)-ROW('15 min'!$G$7))*4,0,4,1))
 
Upvote 0
Welcome to MrExcel Forums.

Your idea is correct. You can implement OFFSET like below in cell G7:
=SUM(OFFSET('15 min'!$G$7:$G$10,(ROW()-7)*4,0))
And then copy down

Another solution would be:
=SUM(INDEX('15 min'!G:G,7+(ROW()-7)*4):INDEX('15 min'!G:G,10+(ROW()-7)*4))
 
Upvote 0
Hi all,

Thank you for these answer so far, and for getting back to me so quickly.

Unfortunately, I have realised I also need to be able to copy this formula into the adjacent columns, such that the cell H7 reads:

=SUM('15 min'!H7:H10)

and the cell H8 would read

=SUM('15 min'!H7:H10)

etc.

I realise I can copy these original formulas into each column of row 7 and change the letter in dollar signs, but wondered if there is perhaps a formula that can do both at once?

Thanks again,
 
Upvote 0
I have changed taurean's suggestion from

=SUM(OFFSET('15 min'!$G$7:$G$10,(ROW()-7)*4,0))

to

=SUM(OFFSET('15 min'!G$7:G$10,(ROW()-7)*4,0))

This seems to have done the trick?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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