averageif formula with an array in excel

ErnieCooper

New Member
Joined
Dec 22, 2021
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I'm trying to get an average of the lowest points in a set of data (average lowest stock level before a delivery comes in, truth-be-told).
I've got a macro that adds a column each day with the stock level on it and want to know the average turning point on that graph.
So far I can do it with another column and an 'if' function that looks to see whether it is lower than both the day before and the day after.
I can then averageif off that.

However, I want to be able to run an averageifs on the actual line showing the average of the numbers that are lesser than both the number before and the number after.

Can anyone help me?7
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
CEFGHIJKLMNO
1Product22/12/202121/12/202120/12/202117/12/202116/12/202115/12/202114/12/202113/12/202110/12/202109/12/202108/12/2021
2WAP20
0​
0​
0​
0​
0​
0​
0​
0​
0​
0​
0​
3WAP27
21.4415677​
20.5515677​
19.5755677​
20.1139117​
16.8013457​
16.8013457​
15.1593457​
15.1593457​
15.1593457​
15.7483561​
15.7483561​
4WAP34
31.6696682​
31.6696682​
31.6696682​
32.3563628​
28.8839148​
28.8839148​
29.0264836​
29.0264836​
29.0264836​
28.9774836​
29.4122348​
5WAP41
26.7614388​
26.7614388​
26.7614388​
27.3317898​
25.2567898​
25.2567898​
25.4101298​
23.5470788​
23.5470788​
23.8954558​
24.5204981​
6WAP54
15.2251974​
15.2251974​
15.2251974​
15.2251974​
15.1803094​
15.1803094​
11.7191714​
11.7191714​
11.9423426​
12.5529422​
13.5060476​

A new column is added to this each morning with the current date.
I need to average all points in a single row that are lesser than the two points either side of it.
Id est: G3 is lower than H3 and F3.

Thanks,
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,177
Members
448,554
Latest member
Gleisner2

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