COMBINING SUMIF AND OFFSET FUNCTION

Ellieprophet

New Member
Joined
Aug 29, 2020
Messages
10
Platform
  1. MacOS
Hi, I’ve got a huge data set. I’ve used the SUMIF function =SUMIF(Y3:Y49”<>#VALUE!”) to add every 48 values and exclude the #VALUE terms. However I also need to combine OFFSeT to repeat this formula to add every 48 terms in that column if that makes sense? As the next term I need is Y:50-Y96 but excel shows Y4:Y50! Thanks if anyone can help
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try this one instead

=AGGREGATE(9,6,INDEX(Y:Y,(ROWS(Z$1:Z1)-1)*48+3):INDEX(Y:Y,(ROWS(Z$1:Z1)-1)*48+48))

Not essential, but ideally Z$1:Z1 should refer to the cell holding the first formula, that way it is less likely to break if you delete rows.
 
Upvote 0
Try this one instead

=AGGREGATE(9,6,INDEX(Y:Y,(ROWS(Z$1:Z1)-1)*48+3):INDEX(Y:Y,(ROWS(Z$1:Z1)-1)*48+48))

Not essential, but ideally Z$1:Z1 should refer to the cell holding the first formula, that way it is less likely to break if you delete rows.

Hi Jason, thanks for getting back for me that one isn’t seeming to work!

Just another side question- what if I wanted to average every 336 rows - whilst still excluding the “value!” And to repeat this throughout my data set? So keep averaging every 336 throughout and exclude the error values.
Thanks !!
 
Upvote 0
Oops, I didn't check the details. Y3:Y49 is 47 rows, not 48. Second part was my fault.

=AGGREGATE(9,6,INDEX(Y:Y,(ROWS(Z$1:Z1)-1)*47+3):INDEX(Y:Y,(ROWS(Z$1:Z1)-1)*47+49))

The bold 9 at the start denotes SUM, you can change it to 1 for average, or 2 for count (there are a lot of other options if needed).
47+3 and 47+49 set the start and end of the first range, with 47 being the number of rows in the range.

Hope that makes sense.
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

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