MAXIFS to take the MAX of two columns

megera716

Board Regular
Joined
Jan 3, 2013
Messages
140
Office Version
  1. 365
Platform
  1. Windows
I am trying to forecast a schedule of the construction payments in multiple new locations.

In L634, I have this formula to provide an estimated next invoice date which works great until we start getting invoices because you'll see it says the next estimated invoice date is 3/1/24 but we actually received an invoice on 3/31/24 so obviously the "next" one can't be coming on 3/1/24. I would like the formula to return the MAX of the estimated next invoice date or the MAX of the actual invoice date, if that is greater, PLUS 1 month.
Excel Formula:
=IF(D634="TI",IF(COUNTIFS($J$2:$J634,J634,$E$2:$E634,"Construction Payment*")=1,EDATE(K634,-6),IF(ISNUMBER(SEARCH("Construction Payment",E634)),EDATE(MAXIFS($L$2:$L633,$J$2:$J633,J634,$E$2:$E633,"Construction Payment*"),1),"")))
1714152449217.png



I tried nesting a MAX of columns L:M in there but it throws an error. Column J is the Location and I need that criteria. Column K is the date we expect the construction to be complete and we plan on construction starting 6 months before that date (hence the EDATE - 6.

If I base the MAXIF on Column M, then when I have a location that has not received any invoices yet, I get "1/31/1900":
1714152733905.png
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I will not recreate the data.
But if you have trouble with nesting function try to un-nest them and use helper columns.
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,344
Members
449,219
Latest member
Smiqer

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