Maximum and Minimum between two serial numbers

theLEARNER1991

New Member
Joined
Mar 22, 2014
Messages
15
Hi friends,

I wanted to find maximum and minimum between two dates, date is in column a7 to a2000, highest sales point for day is in column e7 to e2000,lowest sales point for day is in column f7 to f2000,starting date is computed in column o7 to o2000 and end date is in p7 to p2000.
maximum sales between o7 and p7 should in cell q7 minimum sales between minimum in same period should be in cell r7
maximum sales between o8 and p8 should in cell q8 minimum sales between minimum in same period should be in cell r8 and so on till row 2000...
I tried to use nested function but couldnt use it
the functin I used is
=MAX(IF($A$7:$A$2000>=O7,IF($A$7:$A$2000<=P7,$E$7:$E$2000))) But when i tried to enter function as nested function (by pressing ctrl+shift+enter) nothing happended.
I am using ms excel 2016.

hope you people would help me in this regard

Thanks in advance
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
the formula seem OK. please check the date in column A, are they really sored as Date, can you change its apperance by formating cells? are there hour and minute information in column A, for example 2020-5-19 11:00:00.

or maybe you can try:
=MAX(IF($A$7:$A$2000-O7>=0,IF($A$7:$A$2000-P7<=0,$E$7:$E$2000)))
CTRL+SHIFT+ENTER finish
 
Upvote 0
the formula seem OK. please check the date in column A, are they really sored as Date, can you change its apperance by formating cells? are there hour and minute information in column A, for example 2020-5-19 11:00:00. or maybe you can try: =MAX(IF($A$7:$A$2000-O7>=0,IF($A$7:$A$2000-P7<=0,$E$7:$E$2000))) CTRL+SHIFT+ENTER finish
Thanks for reply
But there seems to be a problem in using nested function ctrl +shift +enter would do nothing[/QUOTE]
 
Upvote 0
Here is one alternative approach:
MrExcel20200516_b.xlsx
ADEFGOPQR
5
6DateHighLowstartendmax salesmin sales
71/1/202010009941/8/20201/10/20201005999
81/2/2020100110001/1/20201/3/20201002994
91/3/202010029961/5/20201/12/20201006993
101/4/20201003998
111/5/202010041002
121/6/20201005996
131/7/202010061002
141/8/20201005999
151/9/20201004999
161/10/202010031001
171/11/20201002993
181/12/202010011000
191/13/20201000990
Sheet13
Cell Formulas
RangeFormula
Q7:Q9Q7=AGGREGATE(14,6,($E$7:$E$19)/(($A$7:$A$19>=$O7)*($A$7:$A$19<=$P7)),1)
R7:R9R7=AGGREGATE(15,6,($F$7:$F$19)/(($A$7:$A$19>=$O7)*($A$7:$A$19<=$P7)),1)


I suppose this could be done with MAXIFS and MINIFS also:
MrExcel20200516_b.xlsx
ST
6max salesmin sales
71005999
Sheet13
Cell Formulas
RangeFormula
S7S7=MAXIFS($E$7:$E$19,$A$7:$A$19,">="&$O7,$A$7:$A$19,"<="&$P7)
T7T7=MINIFS($F$7:$F$19,$A$7:$A$19,">="&$O7,$A$7:$A$19,"<="&$P7)
 
Last edited:
Upvote 0
Here is one alternative approach:
MrExcel20200516_b.xlsx
ADEFGOPQR
5
6DateHighLowstartendmax salesmin sales
71/1/202010009941/8/20201/10/20201005999
81/2/2020100110001/1/20201/3/20201002994
91/3/202010029961/5/20201/12/20201006993
101/4/20201003998
111/5/202010041002
121/6/20201005996
131/7/202010061002
141/8/20201005999
151/9/20201004999
161/10/202010031001
171/11/20201002993
181/12/202010011000
191/13/20201000990
Sheet13
Cell Formulas
RangeFormula
Q7:Q9Q7=AGGREGATE(14,6,($E$7:$E$19)/(($A$7:$A$19>=$O7)*($A$7:$A$19<=$P7)),1)
R7:R9R7=AGGREGATE(15,6,($F$7:$F$19)/(($A$7:$A$19>=$O7)*($A$7:$A$19<=$P7)),1)


I suppose this could be done with MAXIFS and MINIFS also:
MrExcel20200516_b.xlsx
ST
6max salesmin sales
71005999
Sheet13
Cell Formulas
RangeFormula
S7S7=MAXIFS($E$7:$E$19,$A$7:$A$19,">="&$O7,$A$7:$A$19,"<="&$P7)
T7T7=MINIFS($F$7:$F$19,$A$7:$A$19,">="&$O7,$A$7:$A$19,"<="&$P7)
Thanks...
Aggregate function worked perfectly fine
Maxifs and minifs is not available in version which I use...
Thanks a lot for your help...
 
Upvote 0
Maybe we need your qorkbook to see what goes wrong.
[/QUOTE]
Thanks for your reply...
Used aggregate function it worked perfectly fine
For some reason array function is not working in my excel and maxifs & minifs is not available in my version.
Sorry for the late reply had a bit of medical emergency...
 
Upvote 0
Thanks for the feedback, and I'm glad you found a solution.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

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