Results 1 to 4 of 4

Spill overflow to next cell

Threaded View

Mreilander Spill overflow to next cell 04-19-2022, 07:21 PM
Phuocam Re: Spill overflow to next... 04-19-2022, 07:43 PM
Mreilander Re: Spill overflow to next... 04-19-2022, 07:53 PM
Phuocam Re: Spill overflow to next... 04-19-2022, 08:07 PM
  1. #1
    Registered User
    Join Date
    05-01-2014
    Location
    Canada
    MS-Off Ver
    MS365, Version 2305
    Posts
    12

    Spill overflow to next cell

    Hi All,
    I'm trying to make a sheet where Column A indicates a starting week, Column B is the total amount of hrs required and C:BB are the weeks of the year.
    What I'm trying to accomplish is, in this scenario, having no more than 180 hrs consumed in a week, with the spill over going to the next week, cascading until the total remaining hrs is less than column B

    Week 1 is simple, as there is nothing before it. As a formula, I have:
    =IF(A2>1,0,IF(AND(B2>180,A2=1),180,B2))

    Week 2 also seems to be working, where I have:
    =IF(AND(SUM(C2<B2),A2<2),IF(B2-SUM(C2)>180,180,B2-SUM(C2)),IF(A2>2,0,IF(AND(B2>180,A2=2),180,B2-SUM(C2))))

    The problem seems to arise from Week 3 on, and I've hit a wall I think.

    =IF(AND(SUM($C2:D2<B2),A2<3),IF(B2-SUM($C2:D2)>180,180,B2-SUM($C2:D2)),IF(A2>3,0,IF(AND(B2>180,A2<=3),180,B2-SUM($C2:D2))))

    If the starting week number is changed from 2 to 1, Week 3 shows 180 and week 4 shows -40, where I would like week 3 to show 140 and week 4 to show 0

    If the starting week number is changed from 2 to 3, week 3 shows 180 hrs, and week 4 shows 320 hrs, where I would like week 4 to show 180 hrs and week 5 to show 140 hrs.

    I'm sure the solution is something simple that I'm overlooking, but my brain and eyeballs hurt from staring at this so long
    Attached Files Attached Files
    Last edited by Mreilander; 04-19-2022 at 07:54 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 01-27-2021, 12:07 PM
  2. [SOLVED] Using the =IF function is ok on single cell but gives#SPILL on a range
    By Brian Mc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-12-2020, 05:37 PM
  3. Text Overflow to Different Cell
    By 1Time in forum Excel General
    Replies: 6
    Last Post: 12-13-2019, 09:27 AM
  4. Formula to spill value to another cell after reaching a specific amount.
    By pjpankey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-27-2013, 06:03 PM
  5. Replies: 3
    Last Post: 12-29-2011, 08:07 AM
  6. Problems with cell overflow
    By DJBittner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-06-2011, 11:41 AM
  7. how to prevent cell overflow?
    By boarders paradise in forum Excel General
    Replies: 6
    Last Post: 06-29-2011, 07:30 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