lookup/index/match with two reference cells!!

Rasberry

Board Regular
Joined
Aug 11, 2002
Messages
195
Office Version
  1. 365
My data looks like this:
2460564010NORTHEAST BANKSHRI GURU, INC. DBA
8/16/2021​
110.21​
2460564010NORTHEAST BANKSHRI GURU, INC. DBA
10/15/2021​
209.72​
2460564010NORTHEAST BANKSHRI GURU, INC. DBA
10/15/2021​
99.45​
2632185007COMERICA BANKBAUHAUS PROPETIES LLC AND ZIMMER FREI
8/16/2021​
848.61​
2632185007COMERICA BANKBAUHAUS PROPETIES LLC AND ZIMMER FREI
9/15/2021​
814.8​
2632185007COMERICA BANKBAUHAUS PROPETIES LLC AND ZIMMER FREI
10/15/2021​
835.27​
3084016001READYCAP LENDING, LLCFIREPLACE SUPPLY, INC.
8/16/2021​
48.64​
3084016001READYCAP LENDING, LLCFIREPLACE SUPPLY, INC.
9/15/2021​
50.21​
3084016001READYCAP LENDING, LLCFIREPLACE SUPPLY, INC.
10/15/2021​
51.55​
3906245004COMMERCE BANK, A DIVISION OFLIBERTY HEALTHCARE
8/16/2021​
127.87​
3906245004COMMERCE BANK, A DIVISION OFLIBERTY HEALTHCARE
9/15/2021​
0​
3906245004COMMERCE BANK, A DIVISION OFLIBERTY HEALTHCARE
10/15/2021​
121.31​

I can use this formula to bring back the value in the last column: =(INDEX('payment history (16)'!AO:AO,(MATCH('Latest payment'!A11,'payment history (16)'!C:C,0))))
And I can use this formula to bring back the latest (most recent) payment date in the second to last column): =(MAX(IF(A9='payment history (16)'!C:C,'payment history (16)'!AN:AN)))

Assume there are many columns of data I have left out of this snapshot. The reference pieces are the identifier (first column), payment date (fourth column), and the value I want is the fifth column, but only the latest payment, not the first payment in the list?

My problem: How can I adjust back the value that is adjacent to the latest payment date? My formula keeps bringing back the first instance rather than either searching the max of the payment date and bringing back the value adjacent to it. Two of us having been trying to solve this issue for awhile now.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I did a work-around. I sorted the data so that the most recent payment data for each loan number is at the top of each group of loans. Then my Index formula brings back the most recent payment. But I am still curious for future reference, how you nest to have excel use the first reference (loan number), then the second reference to identify the correct value to bring back.
 
Upvote 0
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Done -- Office 365
 
Upvote 0
Thanks for that.
How about
Excel Formula:
=TAKE(SORT(FILTER('payment history (16)'!$AN$2:$AO$1000,A11='payment history (16)'!$C$2:$C$1000),1,-1),1,-1)
 
Upvote 0
Thanks for that.
How about
Excel Formula:
=TAKE(SORT(FILTER('payment history (16)'!$AN$2:$AO$1000,A11='payment history (16)'!$C$2:$C$1000),1,-1),1,-1)
That is interesting, and it works in two instances, but something is not quite right. A coupole of times it works, then it returns #CALC!.
 
Upvote 0
The #calc means that there was nothing matching the criteria.
 
Upvote 0
=INDEX('payment history (16)'!AO:AO,(MATCH('Latest payment'!A18&D18,'payment history (16)'!C:C&'payment history (16)'!AN:AN,0)))

This formula works! I matched two columns using the match function with the ampersand (&) and returned the value in the indexed column.
 
Upvote 0
Glad you sorted it & thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,215,153
Messages
6,123,325
Members
449,097
Latest member
gameover8

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