Find MAX in range and average the values in adjacent 25 cells

Pedro's PhD

Board Regular
Joined
Jun 3, 2011
Messages
63
Hey everyone,

I have data in cell range A1031:A1331. I need to find the maximum value within this range and then compute the combined average from the 25 cells before the maximum value and the 25 cells after the maximum value.

For example: If the MAX was in cell A1150, then I would need the average of A1125:A1175

Thanks..... Pedro
 
Hi Alvin,

Thanks for this, really appreciate it. The reason for the odd design is that it is used to find a peak value/ spike within an EMG trace, and then the average from a 50ms window centered around the peak value. This data is copied into excel after undergoing previous analysis, which allows me to be sure the range will always be the same.

As for the data in the bottom rows, this is because there are baseline values in the previous cells.

The formulae you have provided will work excellently for me!

Thanks.... Pedro
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,215,412
Messages
6,124,761
Members
449,187
Latest member
hermansoa

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