Autosum every n cell

rkramapo

New Member
Joined
Feb 28, 2024
Messages
8
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi,

I'm trying to figure out how to auto sum every n cell- so in the screenshot that I have, I need to auto sum GN4, GR4, GV4, and so on... and then I need to auto sum GO4, GS4, GW4, and so on.

Also GP14, GT14, GX14, and so on.. and then GQ14, GU14, GY14, and so on.

Thanks.
 

Attachments

  • Screenshot 2024-10-09 100505.png
    Screenshot 2024-10-09 100505.png
    26.3 KB · Views: 10
  • Screenshot 2024-10-09 100505.png
    Screenshot 2024-10-09 100505.png
    26.3 KB · Views: 11

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You have 365 listed in your Office version, so I'm hoping that's what you're using here.

Seems like this will do the trick for the GN,GR,GV group:
Excel Formula:
=SUM(FILTER(GN4:GY4,MOD(COLUMN(GN4:GY4),4)=0))

The 4 is for every 4th cell, and you adjust the 0 at the end of the formula to match the remainder of the column number divided by 4. For example, for the GO,GS,GW group the remainder is 1:
Excel Formula:
=SUM(FILTER(GN4:GY4,MOD(COLUMN(GN4:GY4),4)=1))
 
Upvote 0
Hi, another option might be to make use of your headers with a SUMIFS() formula, for example:

Excel Formula:
=SUMIFS($GN4:$GY4,$GN$3:$GY$3,"Sales")
and
Excel Formula:
=SUMIFS($GN4:$GY4,$GN$3:$GY$3,"Count")
 
Upvote 0
Another option
Excel Formula:
=SUM(CHOOSECOLS(GN4:GY4,SEQUENCE(,3,1,4)))
for GO etc change the 1 to a 2
 
Upvote 0
You have 365 listed in your Office version, so I'm hoping that's what you're using here.

Seems like this will do the trick for the GN,GR,GV group:
Excel Formula:
=SUM(FILTER(GN4:GY4,MOD(COLUMN(GN4:GY4),4)=0))

The 4 is for every 4th cell, and you adjust the 0 at the end of the formula to match the remainder of the column number divided by 4. For example, for the GO,GS,GW group the remainder is 1:
Excel Formula:
=SUM(FILTER(GN4:GY4,MOD(COLUMN(GN4:GY4),4)=1))
Apologies, I should have stated for 2016.
 
Upvote 0
You can try :
Excel Formula:
=SUM(INDEX(GN4:$GY4,,1), INDEX(GN4:$GY4,,5), INDEX(GN4:$GY4,,9))
 
Upvote 0
You can use FormR's idea to make it more readable, and I believe this will work on 2016, but I'm not 100%:
Excel Formula:
=SUM((GN14:GY14)*(GN$3:GY$3="Sales"))
 
Upvote 0
I'm pretty sure that SUMIFS() was around in Excel 2016
I may have a bad source or may have read it incorrectly, but I got the impression that SUMIFS was a 2019 feature.

rkramapo: please try FormR's formula before trying mine.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,210
Members
453,023
Latest member
alabaz

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