AVERAGEIFS Equivalent for MIN and Max

murjey

New Member
Joined
Oct 11, 2013
Messages
9
Hi Guys

need help with the following formulas in Excel 2007. I have spent hours on this including web-searches.

I have data recorded during different times of the day. I need a min/ave/max for every day.

I discovered AVERAGEIFS which works fantastically well, but doesn't for min/max. Here I discovered array formulas, but 2 irritating things happen.

1. Even if there is no data (blank cells) the min/max formulas return zero "0". I want this to be blank. :confused:
2. The min formula will not return a minimum value unless ALL the cells have values for a particular date (I assume it sees blank cells as zeros). See 03/10/2013 as an example. :confused:

The formulas I've use are as follows:
Cell E3 - Min:
=+MIN(IF($A$3:$A$26=D4,$B$3:$B$26))
Cell F3 - Average:
=IF(ISERROR(AVERAGEIFS($B$3:$B$26,$A$3:$A$26, D4)),"-",AVERAGEIFS($B$3:$B$26,$A$3:$A$26, D4))
Cell G3 - Max:
=+MAX(IF($A$3:$A$26=D4,$B$3:$B$26))

Will appreciate your help.
Thank you
Greeting from Tanzania

10207355463


Don't know why the image is not showing but it's located here:
http://www.flickr.com/photos/jhemurray/10207355463/
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
The max formula you have above is fine to use as it will stil return the max value weather there's a blank or not

For the MIN you can use the following array formula

=MIN(IF($A$3:$A$10=D4,IF($B$3:$B$10<>"",$B$3:$B$10)))
 
Upvote 0
Perhaps:

MIN (cell E4 - presume you typoed "E3" in your post, as that formula is referencing D4?):

=IFERROR(1/(1/(MIN(IF($A$3:$A$26=D4,IF($B$3:$B$26<>"",$B$3:$B$26))))),"")

MAX (cell F4):

=IFERROR(1/(1/(MAX(IF($A$3:$A$26=D4,$B$3:$B$26)))),"")
 
Upvote 0
Hi,

Another alternative is to create a PivotTable from your raw data table.
Once created:

-> Add the Date field to the Row Labels area
-> Add the Value field to the Values area (drag it in three separate times)
-> Change Value field summarization measures to Min, Average and Max

The PivotTable measures will automatically ignore blanks in the raw data.
The output might look something like this:


Excel 2013
DEFG
1
2Row LabelsMin of ValueAverage of Value2Max of Value3
301/10/2013335539875
402/10/2013
503/10/2013275325375
604/10/2013290386470
Sheet1
 
Upvote 0
Hi Guys

TheCman81 = thank you, easy solution to second question!
XOR LX = fantastic - solution to both problems!
circledchicken = the dark arts of PivotTables :) Sounds simpler and I'll give it a go over the weekend. Thank you

Cheers
John
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,632
Members
449,241
Latest member
NoniJ

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