+ Reply to Thread
Results 1 to 4 of 4

Avoiding Nested If statements

  1. #1
    Registered User
    Join Date
    05-13-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    17

    Avoiding Nested If statements

    I'm working on a stock sales/ordering sheet. It's a much bigger version of the attached.

    Each item has an average sales figure, Minimum Stock figure and then orders in the system coming over over the next 4 months. I have set up a sheet that forecasts each weeks stock sales and inwards with remaining stock on hand.

    In Cell O6 you'll see a nested if statement that is calculating at which point the item will fall below Minimum Stock Requirements. I am hoping that someone can come up with a more elegant solution.

    Thanks,
    Tim
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-13-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    17

    Re: Avoiding Nested If statements

    Hi All,

    Thanks to anyone who has already had a look at this. I'm still bashing away here. Does anyone have any ideas?


    Thanks,
    Tim

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Avoiding Nested If statements

    hi Tim, i actually do not understand the IF statements. i am guessing whichever earlier date is has lesser stock than D6 will be shown? try this array formula in O6:
    =INDEX($E$2:N$2,MIN(IF($E6:N6<$D$6,IF($E6:N6<>"",COLUMN($E6:N6)-COLUMN($E6)+1)))-1)

    you have to paste the formula inside the formula bar & press CTRL + SHIFT + ENTER

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    05-13-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    17

    Re: Avoiding Nested If statements

    Hi Benishiryo,

    Thanks for that. Most helpful.

    Regards,
    Tim

+ 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