+ Reply to Thread
Results 1 to 8 of 8

From-To Matrix to reconcile debts among pairs of people

  1. #1
    Registered User
    Join Date
    12-24-2019
    Location
    Canada
    MS-Off Ver
    Excel for Office 365
    Posts
    5

    From-To Matrix to reconcile debts among pairs of people

    Hi:

    I'm not even sure what to call this kind of chart. A win-loss table? A balance matrix??

    Let's say there are 3 backpackers travelling the world. They pay cash everywhere and are always lending and borrowing money from each other. Every time they lend each other money, they track it in a simple 4 column table: FROM, TO, AMOUNT, CURRENCY. See sample attached.

    At the end of the trip, we want to generate summary tables like the ones attached [note that there would be a Lookup Table for exchanging all currencies into U.S. dollars]. This needs to be scalable for any number of "backpackers". The challenge I'm having is that the "givers" are also "receivers". Maybe this requires a pivot table of a pivot table? Any ideas?

    Thanks very much!
    Attached Images Attached Images

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: From-To Matrix - is this a "thing"?

    Welcome to the Forum arveearv!

    My first thought is to use a pivot table. You also need another column converting foreign currencies to US$. You mentioned that but I don't see it.

    I'm not sure how you plan to reconcile the debts. You have one figure per person, rather than one reconciliation for each pair. Do the debtors put their money in a pot and the creditors then take their money out of the pot? If that's the case then you don't really need the matrix. You just need the net, also shown in my file.

    Just attach the Excel file. It's easier than taking a screenshot first and then attaching that. The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-24-2019
    Location
    Canada
    MS-Off Ver
    Excel for Office 365
    Posts
    5

    Re: From-To Matrix to reconcile debts among pairs of people

    Thank you 6stringjazzer!

    Yes, you have largely solved my problem and the solution looks like it will be simpler than I thought.

    You asked whether the participants reconcile each debt independently or put their money in a collective pot. They will pay and draw from the collective pot, but in the case of disputes they will want them to see a summary of the trades between them. In the pivot table, is it possible to force all of the participants' names into the headers of both the rows and columns, even in instances where a participant, say, appears as a "to" but never a "from"?

    The SumIf net summary (G1:H4) that you created is great. Is there a way for this set of formulas -- including the source names in Column G -- to automatically extend/update as new participant names appear in the line-entry list? Assume that new backpackers can enter the mix at any time. (This is all a simplification of my actual scenario, which is a bunch of clinicians in a medical practice who step in to take on each other's patients for procedures of varying prices.)

    Amazingly helpful so far. Thanks also for the tip about attaching spreadsheets rather than images and also for sharpening my thread's title (maybe a moderator did this).

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: From-To Matrix to reconcile debts among pairs of people

    Quote Originally Posted by arveearv View Post
    In the pivot table, is it possible to force all of the participants' names into the headers of both the rows and columns, even in instances where a participant, say, appears as a "to" but never a "from"?
    No, a pivot table only knows what data there is, not what data there isn't. You could seed the data with zeroes to force that. There might be a completely different approach using something like Power Pivot (which I am not familiar with).

    The SumIf net summary (G1:H4) that you created is great. Is there a way for this set of formulas -- including the source names in Column G -- to automatically extend/update as new participant names appear in the line-entry list?
    I'll give that a little thought. I'm sure there is a way but not a straightforward way.

    Thanks [...] also for sharpening my thread's title (maybe a moderator did this).
    That was me. I probably should have left an edit comment for that.

  5. #5
    Registered User
    Join Date
    12-24-2019
    Location
    Canada
    MS-Off Ver
    Excel for Office 365
    Posts
    5

    Re: From-To Matrix to reconcile debts among pairs of people

    Thanks very much. It sets me up well.

    Quote Originally Posted by 6StringJazzer View Post
    I'll give that a little thought. I'm sure there is a way but not a straightforward way.
    On the question of updating the SUMIF formulas as the list of "backpackers" keeps growing, let's say I already have a range of cells on a different sheet with the names of all the backpackers (for data validation purposes). Can that range be used to set up the SUMIF summary?

    Attached is the validation list added to our test file (Sheet 2), with some new data points (red section) and data validation. I haven't refreshed analyses yet.

    Thanks for the huge help on this forum!
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: From-To Matrix to reconcile debts among pairs of people

    See if this will do what you need.
    The list of names in column I is linked to the data validation list using: =IF(Sheet2!A2="","",Sheet2!A2)
    The list of names in row 12 is populated using: =INDEX($I14:$I21,COLUMNS($A1:A1))
    The values in J14:Q21 are populated using: =IF(COUNTIFS($A$2:$A$7,$I14,$B$2:$B$7,J$12)=0,"",COUNTIFS($A$2:$A$7,$I14,$B$2:$B$7,J$12)&" "&SUMIFS($E$2:$E$7,$A$2:$A$7,$I14,$B$2:$B$7,J$12))
    The amounts each backpacker is owed are populated using*: =SUMPRODUCT(($I14:$I21=J12)*(IFERROR(VALUE(RIGHT($J14:$Q21,LEN($J14:$Q21)-SEARCH(" ",$J14:$Q21))),0)))
    The amounts each backpacker owes are populated using*: =SUMPRODUCT(IFERROR(VALUE(RIGHT(J14:J21,LEN(J14:J21)-SEARCH("",J14:J21)-1)),0))
    The net amounts for each backpacker are populated using: =J9-J10
    *Denotes an array entered formula which is confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula.
    Note that the amounts is owed, owes and net are placed above the table to allow for expansion.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    12-24-2019
    Location
    Canada
    MS-Off Ver
    Excel for Office 365
    Posts
    5

    Re: From-To Matrix to reconcile debts among pairs of people

    Thank you. A very elegant solution!

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: From-To Matrix to reconcile debts among pairs of people

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 10-17-2019, 12:00 PM
  2. Replies: 1
    Last Post: 08-24-2019, 07:03 AM
  3. Replies: 5
    Last Post: 08-01-2017, 04:34 PM
  4. Replies: 8
    Last Post: 07-30-2017, 01:09 PM
  5. [SOLVED] Assemble a list of combinations/pairs into a matrix
    By guillm in forum Excel General
    Replies: 5
    Last Post: 07-09-2015, 04:31 AM
  6. Consolidating Debts for Bills
    By LuckyDay in forum Excel General
    Replies: 2
    Last Post: 09-22-2010, 08:49 AM
  7. [SOLVED] How to create a worksheet to accelerate debts
    By Excel_Challenged in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-06-2005, 03:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1