How do I pull multiple information from the same MainID (foreign key) in Excel?

Jangster

New Member
Joined
Sep 14, 2018
Messages
3
Hi,

I am working for a company which acquires SME/retail Non Performing Loans (Say Borrower Code B_0001 to B_1000)- of which each Borrower Code may contain multiple Loans (ie B_0001 may have 2 LoanIDs (L_0001, L0002... and the running number goes on with the next Borrower. These are the starting balance from the date of acquisition, of which I would then try to accrue and deduct the respective principal and interest of the respective Loan along the way. Each Payment running number, say PMT0001 will have a LoanID next to it as well- indicating which balance it pays

The loan payment sheet would look something like the below (more or less)

PaymentNoBorrowerIDLoanIDDatePrincIntTotal
PMT_001B_0001L_00011 Sep 2017_200010003000
PMT_002B_0002L_00041 Sep 2017205070
PMT_003B_0001L_000230 Aug 2017200200400
PMT_004B_0001L_00011 Aug 2017500300800
PMT_005B_0001L_000131 Aug 2017200200400

<tbody>
</tbody>

Now, I am trying to build some templates for other users which would make it easier to do but I don’t know how to make the Formula to capture all the PaymentNo for the specified Borrower ID and Loan ID

I would like to be able to type “B_0001” and “L_0001” to vlookup/sumif and have it return “PMT_0001” , “PMT_0004” and “PMT_0005” (so i canlink PMT0001 to lookup for more information such as the date of payment, amount paid in P and I to calculate the balance as of that day.

Is there a way to type a formula to capture the respective PaymentNo as describe above, and so that when I copy down the formula, it would capture these PMT number in the order it finds? (ie if I put the formula in cell A3, it would pull PMT_0001, and when I copy down, A4 and A5 would show PMT_004 and PMT 0005 accordingly?)


Thanks in advance.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Don't you think that PivotTable will be a good choice? :cool:

I am not sure really.... Usually when i do information like sum of something, i used to do Sumifs to pull information (i must admit, i stink in excel and learned through googling mostly to reach where i am now with my limited database knowledge)

If i do pivot table, it would have to manually create everytime right? I am trying to pull the paymentID to essentially pull other info... So that adjacent to those info, i will have a standing formula to calculate the amount which is paid on that particular date to roll into what today's loan balance would be... (The idea for me is to create an excel spreadsheet for a non-excel savvy user to just type the BorrowerID and show all the relevant information in 1 page on the fly such as name, address, last contact date, ladt payment date, etc but i am just trying to figute out how to pull the payment profile effectively in behind so i can show thr correct loan balance as of today() for the account officers to see)


Ps. Pls excuse any typos or bad grammar as I am non-native and typing on the phone
 
Upvote 0
I said PivotTable based on your example. It's hard to say whole solution with little part of information.
If you have more tables you can try PivotTable with DataModel, PowerQuery (Excel version?) or even formula.

edit:
PivotTable from your example

BorrowerIDB_0001
LoanIDL_0001
PaymentNoDateSum of PrincSum of IntSum of Total
PMT_001
01/09/2017​
2000​
1000​
3000​
PMT_004
01/08/2017​
500​
300​
800​
PMT_005
31/08/2017​
200​
200​
400​
Grand Total
2700
1500
4200
 
Last edited:
Upvote 0
That pivot actually would be great (although maybe overkill as i will only need to pull the Payment No and do a bunch of formulas to pull information from column B,c,d onwards..…

Essentially what wouls be great is a formula to put in cell A4 (where it currently reass pmt001), and i can copy down the formula to A5,6 to get the Pmt numbr)

What would be the logical functiin to use so i can try to google for more info?

Thanks
 
Upvote 0
Honestly I don't understand now what are you tryin' to achieve :)
I can't help with formula (I prefer Excel features like PivotTable and PowerQuery) so maybe someone else will give you formula solution.

will be fine if you post source data (post#1) and expected result (post#?)
 
Upvote 0
Welcome to the MrExcel board!

See if this is any use. I have used helper cells in A12 down. These could be placed elsewhere and hidden if you want or the other formulas could be adjusted to not need the helpers. However, the helper cell make the other formulas much simpler.

A12 & B12 are copied down as far as you might ever need.
C12 is copied across and down. (Column C may need its formatting set to date after you have entered the formulas)

Excel Workbook
ABCDEFG
1PaymentNoBorrowerIDLoanIDDatePrincIntTotal
2PMT_001B_0001L_00011-Sep-17200010003000
3PMT_002B_0002L_00041-Sep-17205070
4PMT_003B_0001L_000230-Aug-17200200400
5PMT_004B_0001L_00011-Aug-17500300800
6PMT_005B_0001L_000131-Aug-17200200400
7
8
9BorrowerIDB_0001
10LoanIDL_0001
11PaymentsDatePrincInt
121PMT_0011-Sep-1720001000
134PMT_0041-Aug-17500300
145PMT_00531-Aug-17200200
15
Payments
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,424
Members
448,961
Latest member
nzskater

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