calculate average percentage of every 4th cell

Arie Bos

Board Regular
Joined
Mar 25, 2016
Messages
224
Office Version
  1. 365
Platform
  1. Windows
I have a column with 4 recurring formula's that repeat every 4th cell. Every 1st of 4 creates a percentage A: 3.00%, 3.51%, 3.59% and 3.57%. This column has over a 1000 of these pairs of 4 formulas. How can I calculate the average 3.42% of a range of this column (in this section below, between row 1083 and 1098)?
I tried :

=SUMPRODUCT((MOD(ROW(P1083:P1098);4)=0)*(P1083:P1098))/INT(ROWS(P1083:P1098)/4)

But that creates wrong results.​


1083 3.00%
1084 74,150.00
1085 70%
1086 2,509,942.50
1087 3.51%
1088 59,750.00
1089 50%
1090 2,569,692.50
1091 3.59%
1092 54,350.00
1093 43%
1094 2,624,042.50
1095 3.57%
1096 53,000.00
1097 42%
1098 2,677,042.50
 
Hi Ron,

one more question on your magic formula....
If I also want to calc the ave of every 3rd item in the same column, instead of the first.. Which parameter in the formula should then change?

thanks,
Arie
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
If you want flexibility in the ordinal to average, try this (using my above example)
Code:
O1071: First row to include........ 1000
O1072: Last row to include......... 1067
O1073: The item number to include..    3
Then use this formula:
Code:
=AVERAGE(INDEX(LOOKUP($O$1071+(O1073-1)+(ROW(INDIRECT("1:"&(INT(($O$1072-$O$1071)/4)+1)))-1)*4,ROW(M:M),M:M),0))

In that situation, the 3rd item in every group of 4 will be averaged.

Is that something you can work with?
 
Upvote 0
Hi Ron,

one more question on your magic formula....
If I also want to calc the ave of every 3rd item in the same column, instead of the first.. Which parameter in the formula should then change?

thanks,
Arie

Control+shift+enter, not just enter:

=AVERAGE(IF(MOD(ROW(P1083:P1098)-ROW(P1083),3)=0,P1083:P1098))

which is robust against row insertions in front of the current row and not volatile.
 
Upvote 0

Forum statistics

Threads
1,216,817
Messages
6,132,873
Members
449,763
Latest member
sameh_ag

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