+ Reply to Thread
Results 1 to 7 of 7

Nested if functions help

  1. #1
    Registered User
    Join Date
    06-12-2014
    Posts
    3

    Nested if functions help

    Hi,

    I am trying to use a number of nested if functions to return a total number based on the number of weeks the cash flow will impact e.g. 5 weeks with cash flow of £50,000 is £250,000. The complexity I have is how to spread this out into quarters across the year based on user specified start and end dates e.g.

    • Q1 is 201401 to 201413 (inclusive) if the cash lands in the final 2 weeks in Q1 (201412 to 201413 inclusive) and the remaining 3 weeks in Q2 (201414 to 201416 inclusive) I want the result to show £100,000 for Q1 and £150,000 for Q2.
    The other complexity I have is if I have a one off cheque payment I add this into a separate column and want Excel to ignore the cash column and look at the cheque column while putting the correct value into the relevant Quarter column e.g.
    • If I have a cheque banked in Q3 (201427 to 201439) I want the result to be out into the Q3 column and not multiplied by the number of weeks.
    So far I have the following formulas:

    Q1 - =IF($C7>=201414,0,IF($B7="Cheque",$L7,$E7*(201414-$C7)))
    Q2 - =IF($B7="cheque",IF($C7>=201414,$L7,0),$E7*(201427-MAX($C7,201414)))
    Q3 - =IF($B7="cheque",IF($C7>=201427,$L7,0),$E7*(201440-MAX($C7,201427)))
    Q4 - =IF($B7="Cheque",IF($C7>=201427,$L7,0),$E7*(201440-MAX($C7,201427)))

    I have also attached an example document which may be helpful.

    I hope this is clear to all.

    Many thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Nested if functions help

    Hi ashley22,
    I'm not sure I understand what you're trying to do. Can you update your spreadsheet with an example of what the result should be and why?
    1. Include a sample workbook with an example of the result you want
    2. Use [CODE] and [FORMULA] wrappers for your VBA code or excel formulas
    3. If your question has been answered, mark the thread as SOLVED and click on the "Add Rep" star to thank whoever helped you.

  3. #3
    Registered User
    Join Date
    06-12-2014
    Posts
    3

    Re: Nested if functions help

    Multiple nested if function help.xlsxHi,

    Apologies that this was not clear, it is difficult to explain. I have added some additional examples in row 13 to 15 and added my comments in column M which explains the result.

    Hope this is clearer.

  4. #4
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Nested if functions help

    Is this what you wanted?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-12-2014
    Posts
    3

    Re: Nested if functions help

    Hi,

    Thank you for the reply. It is almost there! The calculation works perfectly if the type is seelcted as 'Cash' however the 'Cheque' option is not working. In row 9 on the example £900,000 should show up in only Q2 and in row 14 £200,000 should show up in Q4.

    Thanks

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Nested if functions help

    This would probably be much easier if you used actual dates. Excel has a WEEKNUM() function that determines the week number. Using that, we could probably come up with a more effective formula
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Nested if functions help

    Like this?

    Edit: I agree with FDibbins above.

+ 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. Nested IF Functions
    By brotherwo in forum Excel General
    Replies: 3
    Last Post: 03-30-2011, 11:01 AM
  2. Nested IF Functions
    By dph in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2008, 08:15 AM
  3. Nested IF and MID functions
    By Jan Buckley in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  4. [SOLVED] Nested Functions
    By Steve Almond in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  5. [SOLVED] nested if(and) functions
    By Rohan in forum Excel General
    Replies: 3
    Last Post: 08-11-2005, 09:05 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