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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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