MAX Lookup Help

Golfpro1286

New Member
Joined
Aug 22, 2018
Messages
30
I am working on a scorecard and for a portfolio section of it I want to either calculate or lookup the most recent dollar amount of total open loans of the officer in cell C7. The table below (Located in a separate sheet) is named "Port". The expected result is $52,000,000 (Adam, most recent date 6/1/19).

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Officer[/TD]
[TD]Date[/TD]
[TD]System[/TD]
[TD]Category[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]Adam[/TD]
[TD]5/1/19[/TD]
[TD]CL[/TD]
[TD]Total Open Loans[/TD]
[TD]$51,000,000[/TD]
[/TR]
[TR]
[TD]Adam[/TD]
[TD]6/1/19[/TD]
[TD]CL[/TD]
[TD]Total Open Loans[/TD]
[TD]$52,000,000[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]5/1/19[/TD]
[TD]CL[/TD]
[TD]Total Open Loans[/TD]
[TD]$12,000,000[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]7/1/19[/TD]
[TD]CL[/TD]
[TD]Total Open Loans[/TD]
[TD]$11,000,000[/TD]
[/TR]
</tbody>[/TABLE]

C7: Adam



I first tried a SUMIFS formula but the MAX of the date did not work because it just gave the most recent date in the entire date column.

Code:
=SUMIFS(Port[Amount],Port[Officer],$C$7,Port[System],"CL",Port[Category],"Total Open Loans",Port[Date],MAX(Port[Date])

Is there an adjustment to this to make it work without being an array formula that requires ctrl+shift+enter to use or possibly an index formula to look it up?

Thanks!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try this


Code:
=SUMPRODUCT((Port[Officer]=C7)*(Port[System]="CL")*(Port[Category]="Total Open Loans")*(Port[Date]=LOOKUP(2,1/((Port[Officer]=C7)*(Port[System]="CL")*(Port[Category]="Total Open Loans")),Port[Date]))*(Port[Amount]))
 
Last edited:
Upvote 0
Just to show the many options of Excel, here are a few more options:

Use this one if the loans are in date order by officer. It essentially finds the last entry by an officer.
Code:
=LOOKUP(2,1/(Port[Officer]=C7)/(Port[System]="CL"),Port[Amount])

If you have the MAXIFS function, you can adapt your existing formula as follows:
Code:
=SUMIFS(Port[Amount],Port[Officer],$C$7,Port[System],"CL",Port[Category],"Total Open Loans",Port[Date],[COLOR=#ff0000]MAXIFS(Port[Date],Port[Officer],C7,Port[System],"CL")[/COLOR])

Here's another option, but requires that your amounts are under $10 billion dollars:
Code:
=MOD(AGGREGATE(14,6,(Port[Date]*10^10+Port[Amount])/(Port[Officer]=C7)/(Port[System]="CL"),1),10^10)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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