Maximum/Minimum Formulas

Drewmyster

Board Regular
Joined
May 16, 2007
Messages
151
Office Version
  1. 365
Platform
  1. Windows
Hi there,

I'm having trouble using the formula above to work out what the largest and smallest figures are within a date range.

What I've been asked to do is find out the largest and smallest figures for any given month within a period going back 5 years or so.

My spreadsheet looks something like this going down;

Column A
Date
01/01/2011

Column B
Amount
£1,500

The formula I was shown on a previous topic to filter the month and year, doesn't seem to work properly, so please could somebody help me to fix it.

=MAX(IF($A$2:$A$30="June",IF(YEAR($A$2:$A$30)="2011",$B$2:$B$30)))

Many thanks.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Try this enterd with CTRL + SHIFT + ENTER

=MAX(IF(TEXT($A$2:$A$30,"MMMMYYYY")="JUNE2011",$B$2:$B$30))

Hope that helps.
 
Upvote 0
Try this enterd with CTRL + SHIFT + ENTER

=MAX(IF(TEXT($A$2:$A$30,"MMMMYYYY")="JUNE2011",$B$2:$B$30))

Hope that helps.

I'd love to say it helped, but carefully following your formula, using CTRL + SHIFT + ENTER returns the following error message :(;

"Microsoft Office Excel cannot calculate a formula. There is a circular reference in an open workbook, but the references that cause it cannot be listed for you. Try editing the last formula you entered or removing it with the Undo command."

Any further suggestions please?
 
Upvote 0
You cannot put the formula within a range referenced by the formula...

so it can't go in A2:A30 or B2:B30
 
Upvote 0
This is another way (Ctrl+Shift+Enter)

Code:
=MAX(IF((MONTH($A$2:$A$30)=6)*YEAR($A$2:$A$30)=2011,$B$2:$B$30))
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,189
Members
452,893
Latest member
denay

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