Maxif and min if

SonuBhaiya

New Member
Joined
Nov 28, 2018
Messages
2
Hello friends,
I would like create a max and min formula that would also meet some criteria.
Column A is for Date
Column E is for Price
Cell N5 is period start date
Cell N6 is period end date
I would like to know max and min price within the period.
The formula which i used was
=max(if($a$2:$a$2000>=n5,if($a$2:$a$2000<=n6, "N. A."), "N. A."))
and same formula for min function but the above formula returned value for whole 2000 period instead of look out period
Hope you people will help me out soon
Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
For Max:=

Code:
=AGGREGATE(14,6,$E$2:$E$2000/(($A$2:$A$2000>=N5)*($A$2:$A$2000<=N6)),1)

For Min:=

Code:
=AGGREGATE(15,6,$E$2:$E$2000/(($A$2:$A$2000>=N5)*($A$2:$A$2000<=N6)),1)
 
Upvote 0
If you have Office 365 or Office 2016, then you can use this as well:

For Max:=

Code:
=MAXIFS($E$2:$E$2000,$A$2:$A$2000,">="&N5,$A$2:$A$2000,"<="&N6)

For Min:=

Code:
=MINIFS($E$2:$E$2000,$A$2:$A$2000,">="&N5,$A$2:$A$2000,"<="&N6)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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