MAX, MIN, Average...IF

Danny8231

New Member
I want to max, min and average a range of data only if it meets a criteria. Much like =Countif(range, July 2012)

To get the max and min values only if it's in July or another month.

Is there a formula?

Thanks!
--Dan

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hello,

=MIN(IF(\$D\$1:\$D\$9="a",\$E\$1:\$E\$9))
=MAX(IF(\$D\$1:\$D\$9="a",\$E\$1:\$E\$9))
=AVERAGE(IF(\$D\$1:\$D\$9="a",\$E\$1:\$E\$9))

The above are array formulae and need to be confirmed with CTRL-Shift-Enter.

In Excel 2007 and above, you can use AverageIF() and enter normally

=AVERAGEIF(\$D\$1:\$D\$9,"a",\$E\$1:\$E\$9)

To evaluate the month of a given date range:

=MIN(IF(MONTH(\$D\$1:\$D\$9)=7,\$E\$1:\$E\$9))
=MAX(IF(MONTH(\$D\$1:\$D\$9)=7,\$E\$1:\$E\$9))
=AVERAGE(IF(MONTH(\$D\$1:\$D\$9)=7,\$E\$1:\$E\$9))

Confirm with Ctrl-Shift-Enter

cheers,

Last edited:

Replies
8
Views
226
Replies
8
Views
165
Replies
0
Views
60
Replies
0
Views
124
Replies
5
Views
175

1,203,115
Messages
6,053,598
Members
444,674
Latest member
DWriter9

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.

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

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