+ Reply to Thread
Results 1 to 2 of 2

nested IF proration formula - is it even possible?

  1. #1
    Registered User
    Join Date
    01-29-2018
    Location
    California
    MS-Off Ver
    2017
    Posts
    1

    nested IF proration formula - is it even possible?

    I'm going crazy and starting to think this is impossible. I am struggling with a complex nested IF formula. I have most of it figured out and I use LET to help with readability. The part that is stumping me has to do with calculating prorations. Basically, I have a fee % schedule where the fee changes every x number of years. I have a dozen funds to calculate quarterly fees for, all with different inception dates. This would be simple enough to calculate the appropriate fee for which ever quarter the fund happens to be in, by looking it up in the fee table, however I also need to account for partial quarters when the fee changes occur, in cases where the inception dates fall in the middle of a quarter. So the task is to calculate the fees on a typical 3/31, 6/30, 9/30, 12/31 schedule, but if the fund started on say, 4/20, then the fee for that quarter would be a sum of the prorated first fee and the prorated following fee.

    Here is my work thus far. I will add the other complicating factors as well, making up an IF nest:

    There are 2 types of funds, FundA and FundB, each with a different fee schedule

    The fees are based on Size in years 1-10 and NAV in years 11-12

    Prorations should happen any time the calculation changes, whether its due to fee change, or switch from Size to NAV

    I also have the following UDFs:

    QuarterDifference(startdate, enddate) = number of quarters between two dates

    QuarterStart(date) = starting date of the quarter

    QuarterEnd(date) = ending date of the quarter

    Cell F2:

    =LET(

    Fund, $A2,

    QD, quarterdifference($C2, F$1),

    FundRate, XLOOKUP(QD, $C$26:$C$73, $D$26:$D$73) / 365,

    FundBRate, XLOOKUP(QD, $C$26:$C$73, $E$26:$E$73) / 365,

    FirstQFund, (XLOOKUP(1, $C$26:$C$73, $D$26:$D$73) / 365 * $D2 * (F$1 - $C2)),

    FirstQFundB, (XLOOKUP(1, $C$26:$C$73, $E$26:$E$73) / 365 * $D2 * (F$1 - $C2)),

    QuarterComm, $D2 * (QuarterEnd(F$1) - QuarterStart(F$1)+1),

    QuarterNAV, $E2 * (QuarterEnd(F$1) - QuarterStart(F$1)+1),

    Result, IF(Fund = "FundA",

    IF(QD < 0, 0,

    IF(QD = 0, FirstQFund,

    (FundRate * QuarterComm)

    )

    ),

    IF(QD < 0, 0,

    IF(QD = 0, FirstQFundB,

    (FundBRate * QuarterComm)

    )

    )

    ),

    Result

    )

    The formula goes in the yellow cells in the screenshot. The fee table is on the bottom. (I can't post links/pictures yet :/)
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2412 (Windows 11 24H2 64-bit)
    Posts
    88,728

    Re: nested IF proration formula - is it even possible?

    Welcome to the forum.

    As far as I know, there is no Excel 2017 - is this correct? Is it a Mac version? Please check and amend your forum profiule. Thanks.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Real Estate Tax Proration Calculator
    By fairwayjim in forum Excel General
    Replies: 3
    Last Post: 11-12-2023, 03:18 PM
  2. Proration formula
    By RudyM88 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-30-2020, 05:18 PM
  3. Proration of hours
    By wburbage in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2019, 09:56 AM
  4. [SOLVED] Nested IF and nested Concatenation formula
    By VisionSmart in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-09-2018, 08:00 AM
  5. Help with a nested, nested, nested formula
    By duanrd2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-09-2017, 04:43 PM
  6. Replies: 2
    Last Post: 10-08-2009, 09:51 PM
  7. help on a nested countif/nested if formula
    By vickiemc in forum Excel General
    Replies: 2
    Last Post: 08-13-2008, 08:29 AM

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