+ Reply to Thread
Results 1 to 5 of 5

sum function for multiple amounts w/various tenors

  1. #1
    Registered User
    Join Date
    06-26-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    13

    sum function for multiple amounts w/various tenors

    Ok, I have a complex sum function that involves a few components which I can't figure out how to put together.

    I've attached a spreadsheet of what I'm looking to do.

    Basically, I have counterparts that we're borrowing from and lending to. But for different dates, amounts. I want to add up our lending and borrowing activity and then have a total variance for those periods. In the spreadsheet, column K (variance) has the total done manually for the lending and borrowing activity, this is where I need a formula to make it mechanical. The difficulty comes in in terms of the tenors; borrowing and lending can begin and mature at different periods so there is overlap most of the time with the figures. I hope I'm making sense here. I tried to draft the example in the spreadsheet as best as I can.

    Thanks for any help I can receive on this.
    Attached Files Attached Files
    Last edited by finance14; 11-10-2011 at 03:47 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Excel guru needed for complicated sum function

    Hi finance14,

    Fix your Title of thread and then read the rest.

    These problems are a little hard to understand sometimes. I looked up Tenor and got all these great singers names. Then I found it is simply the term of a bond. That made more sense.

    I believe you need to create a better table with your data and then do a running total column in a pivot table to show what you want. It looks you will need to track money in and out twice for your transactions. I've "fixed" your data on the attached to show how I'd do it. The pivot table has a second column of running total to show if you are in the black or not. See if the attached helps.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    09-01-2010
    Location
    SoCal
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: sum function for multiple amounts w/various tenors

    Hi Finance. Yes, you didn't explain it very well, but I gave it a shot anyway.

    I came up with a formulaic solution that gives you an answer for each day, but you need to add a couple columns for each day. Expand the ranges as necessary.

    The formula uses the "Sumifs" function. Please go read up on that if you're unfamiliar. Basically, it looks at a date, for instance 11/10/11, and tests each line of your data to see if the Settlement date is less than or equal to (<=) and the Maturity date is greater than the chosen date. A complicated 'between' if you will. It performs that test for Funds borrowed, then performs the test again for funds lent and subtracts it.

    The two columns in blue are the new ones. I can't figure out how to get the "<=" into the sumifs formula itself. If I could, you wouldn't need these columns. Maybe someone else knows.

    My answers are the same as the previous posters, but slightly different from yours. So either there is another condition we aren't aware of, or the manual calculations may not be correct. For instance, the 16th you show 10-2=8, but the 16th is a maturity date, and the 10 should be gone so it's just -2. At least, that is the rule that was applied on the 10th when the 50 wasn't counted. Capisce?

    Hope this helps. See Luciano file attached. (Tenor humor... not much though)
    Attached Files Attached Files
    Last edited by Mojave; 11-10-2011 at 03:36 PM.

  4. #4
    Registered User
    Join Date
    06-26-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: sum function for multiple amounts w/various tenors

    Incredible, you pegged it! I was just messaging the moderator (TMShucks) to tell him to delete this post so I can start anew because my manual calcs were incorrect (haste makes waste, also the reason I desperately needed this to be automatic).

    Cannot thank you enough, this is in all sincerity perfect and I am much obliged and humbled. In short, you're friggin' ace!

    A million thanks.

    Hope you guys have a great weekend!



    Quote Originally Posted by Mojave View Post
    Hi Finance. Yes, you didn't explain it very well, but I gave it a shot anyway.

    I came up with a formulaic solution that gives you an answer for each day, but you need to add a couple columns for each day. Expand the ranges as necessary.

    The formula uses the "Sumifs" function. Please go read up on that if you're unfamiliar. Basically, it looks at a date, for instance 11/10/11, and tests each line of your data to see if the Settlement date is less than or equal to (<=) and the Maturity date is greater than the chosen date. A complicated 'between' if you will. It performs that test for Funds borrowed, then performs the test again for funds lent and subtracts it.

    The two columns in blue are the new ones. I can't figure out how to get the "<=" into the sumifs formula itself. If I could, you wouldn't need these columns. Maybe someone else knows.

    My answers are the same as the previous posters, but slightly different from yours. So either there is another condition we aren't aware of, or the manual calculations may not be correct. For instance, the 16th you show 10-2=8, but the 16th is a maturity date, and the 10 should be gone so it's just -2. At least, that is the rule that was applied on the 10th when the 50 wasn't counted. Capisce?

    Hope this helps. See Luciano file attached. (Tenor humor... not much though)

  5. #5
    Registered User
    Join Date
    09-01-2010
    Location
    SoCal
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: sum function for multiple amounts w/various tenors

    Glad that worked! Here's the improved version. Don't need those extra columns. A little text concatenation and we are now good to go. (Although, now it's a little more difficult to see what the formula is doing!)
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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