+ Reply to Thread
Results 1 to 4 of 4

Nested If statements / logic statements

  1. #1
    Registered User
    Join Date
    06-17-2009
    Location
    Da Stix
    MS-Off Ver
    Excel 2003
    Posts
    4

    Nested If statements / logic statements

    So here's the problem I need to buy a guitar for 3 out of every 4 people. Across the X axis (representing time) is the quantity of people.

    Ex- 1 0 2 3 2 2 4 4 3 4 5 4 4 3 5 4 4 4 1 (people)

    So the output that I would expect using the ground rules and assumptions that I have is

    1 0 2 2 1 2 3 3 2 3 4 3 3 2 4 3 3 3 1 (guitars)

    I lay in a guitar for each of the 1st 3 people out of a group of 4. The next year may contain a count from the prior year(s). Notice for the first 3 values they stay the same but once you reach the 4th value (year 4) it's decremented by 1 to account for not reaching 4 with the SUM of people in the prior years.

    I need a formula that is drillable and allows me to change the amount of people per year and modifies the output (guitars) based on the qty and lay-in. Any questions don't hesitate to ask.

    Super huge thanks in advance!!!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Nested If statements / logic statements

    Here's one way:
    Please Login or Register  to view this content.
    The formula in B2 and copied across is =CEILING(SUM($B1:B1) * 3 / 4, 1) - SUM($A2:A2)
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-17-2009
    Location
    Da Stix
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Nested If statements / logic statements

    Thanks mang! That's way easier than what I was trying to do. Now gotta go learn what that function does.

    You rock!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Nested If statements / logic statements

    You're welcome. Would you please mark the thread as Solved?

+ 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