Another formula that might be your friend is AVERAGEIF or AVERAGEIFS.

My approach uses SUMPRODUCT which will perform array like calculations without being an array.

1) Build a table averages

In my example I listed out the month number for each month regardless of year in E2 to E13. In the adjacent column use the following formula in F2 and copy down to F13.

```
=IFERROR(SUMPRODUCT((--RIGHT($A$2:$A$11,2)=E2)*$B$2:$B$11)/SUMPRODUCT(--(--RIGHT($A$2:$A$11,2)=E2)),"")
```

The IFERROR function is used to deal with the divide by 0 error that will occur if there is no value for a given month. If you prefer to see 0 instead of a blank, change the "" at the end to 0.

The above formula is based on the assumption that your dates are actually strings. If they are actually dates then use the following:

```
=IFERROR(SUMPRODUCT((MONTH($A$2:$A$11)=E2)*$B$2:$B$11)/SUMPRODUCT(--(MONTH($A$2:$A$11)=E2),"")
```

2) Find the maximum Average

In the example below I used the following formula in I2:

```
=MAX($F$2:$F$13)
```

3) Find the corresponding month

In J2 I used the following formula to look up the position of the max value in the list. If their are repeat / tied maximums, it will return the first month.

```
=MATCH(I2,$F$2:$F$13,0)
```

`MATCH`

the`MAX`

value of column`B`

, the use that`INDEX`

to return the corresponding date – cybernetic.nomad Dec 7 '18 at 15:34