2010 Max-If with Multiple Value Ranges

InfrequentVisitor

New Member
Joined
Mar 30, 2016
Messages
28
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello,

Very simply, there are sections of my data I want to exclude in my Max- and Min-If statements, but these sections are not continuous.

These formulas work for excluding all account numbers less than 9700000:

=MAX(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,Table1[Solde/Balance])))))
=MIN(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,Table1[Solde/Balance])))))


I also want to exclude account numbers equal to and between 6805000 and 6818000 (<6805000, >6818000).
I thought the following formula would work, but it returns $0 and I know it's not correct:

=MAX(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,IF(Table1[Account]<6805000,IF(Table1[Account]>6818000,Table1[Solde/Balance])))))))


I was testing the viability of what I had done by reversing the signs, and found that I could return the correct value in-between the account numbers I want to exclude:

=MAX(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,IF(Table1[Account]>=6805000,IF(Table1[Account]<=6818000,Table1[Solde/Balance])))))))

Does Excel only recognize one range at a time for a column? Any help would be appreciated.

Respectfully,

Eric
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hello,

Very simply, there are sections of my data I want to exclude in my Max- and Min-If statements, but these sections are not continuous.

These formulas work for excluding all account numbers less than 9700000:

=MAX(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,Table1[Solde/Balance])))))
=MIN(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,Table1[Solde/Balance])))))


I also want to exclude account numbers equal to and between 6805000 and 6818000 (<6805000, >6818000).
I thought the following formula would work, but it returns $0 and I know it's not correct:

=MAX(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,IF(Table1[Account]<6805000,IF(Table1[Account]>6818000,Table1[Solde/Balance])))))))


I was testing the viability of what I had done by reversing the signs, and found that I could return the correct value in-between the account numbers I want to exclude:

=MAX(IF(Table1[Year]=$A$2,IF(Table1[Month]=$B$2,IF(Table1[Section]=$E$2,IF(Table1[Account]<9700000,IF(Table1[Account]>=6805000,IF(Table1[Account]<=6818000,Table1[Solde/Balance])))))))

Does Excel only recognize one range at a time for a column? Any help would be appreciated.

Respectfully,

Eric

=MAX(IF((Table1[Year]=$A$2)*(Table1[Month]=$B$2)*(Table1[Section]=$E$2)*(Table1[Account]<9700000)*(NOT((Table1[Account]>=6805000)*(Table1[Account]<=6818000))),Table1[Solde/Balance]))
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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