Combine MAX and IF. What am I doing wrong?

sirrox

New Member
Joined
Feb 10, 2010
Messages
7
I am having a really tuff time with creating this forumla.
I have a sheet with;
1. A column of daily dates in 'Sheet1'!$S$7:$S$10000. (these dates go from 1995 to current)
2. A column of corresponding values for those dates in ''Sheet1'!$AB$7:$AB$10000.
I am creating another sheet that will present the min and max values per month of every month for a given year.
So I created a seperate sheet;
1. A column with the start date of each month A1:A15
2. A column with the end date of each month B1:B15
No I tried placing a forumala in E4 that would give me the max value from column 'AB' for dates in january 2009.

{=MAX(IF(AND('Sheet1'!$S$7:$S$10000>=A4,'Sheet1'!$S$7:$S$10000<=B4),'Sheet1'!$AB$7:$AB$10000))}
It keeps returning '0'.
What am I doing wrong?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello sirrox, welcome to MrExcel, you don't want AND, try like this:

=MAX(IF('Sheet1'!$S$7:$S$10000>=A4,IF('Sheet1'!$S$7:$S$10000<=B4,'Sheet1'!$AB$7:$AB$10000)))

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0
Jeeshhh... and just like that. Worked like a charm!

A guy can struggle all day with this stuff. Thank you so much for your welcome and clear instructions!
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,343
Members
449,155
Latest member
ravioli44

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