Array Formula for Max Value with Conditions

PoggiPJ

Active Member
Joined
Mar 25, 2008
Messages
330
Originally I only needed the latest date in a list - simple, Max(A2:A7). Now I need to only consider end dates where the Extended Total is >0. I understand the basics of how array formulas work and have written some simple ones, but I am struggling with an array formula that will give me the max of col A when Col B > 0. In the following example rows 3 and 5 would be excluded and the result would be 5/31/2016. Would really appreciate some help.

Excel 2003
AB
Coverage Ends Extended Total

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]3/1/2013[/TD]
[TD="align: right"] 4,339.00[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]12/31/2017[/TD]
[TD="align: right"] -[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]5/15/2015[/TD]
[TD="align: right"] 39,992.00[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]7/31/2016[/TD]
[TD="align: right"] -[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]4/1/2013[/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]5/31/2016[/TD]
[TD="align: right"] 5,422.00[/TD]

</tbody>
Sheet1
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Originally I only needed the latest date in a list - simple, Max(A2:A7). Now I need to only consider end dates where the Extended Total is >0. I understand the basics of how array formulas work and have written some simple ones, but I am struggling with an array formula that will give me the max of col A when Col B > 0. In the following example rows 3 and 5 would be excluded and the result would be 5/31/2016. Would really appreciate some help.

Excel 2003
AB
Coverage Ends Extended Total

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]3/1/2013[/TD]
[TD="align: right"] 4,339.00[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]12/31/2017[/TD]
[TD="align: right"] -[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]5/15/2015[/TD]
[TD="align: right"] 39,992.00[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]7/31/2016[/TD]
[TD="align: right"] -[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]4/1/2013[/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]5/31/2016[/TD]
[TD="align: right"] 5,422.00[/TD]

</tbody>
Sheet1


Excel 2010
ABCD
1Coverage EndsExtended Total
23/1/20134,339.005/31/2016
312/31/2017
45/15/201539,992.00
57/31/2016
64/1/2013
75/31/20165,422.00
Sheet3
Cell Formulas
RangeFormula
D2{=MAX(IF(B2:B7>0,A2:A7))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Robert, thank you very much. I was definitely going down the wrong path with my thinking. That worked perfectly.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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