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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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,214,951
Messages
6,122,446
Members
449,083
Latest member
Ava19

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