MAX, MIN, Average...IF

Danny8231

New Member
Joined
Jun 5, 2009
Messages
40
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:
Upvote 0

Forum statistics

Threads
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.
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