+ Reply to Thread
Results 1 to 11 of 11

How to process surplus amounts in values

  1. #1
    Registered User
    Join Date
    02-14-2022
    Location
    Harmony, Maine
    MS-Off Ver
    Office 365
    Posts
    28

    Question How to process surplus amounts in values

    I am working with schedule data at my facility that is used to make various projections.

    Our scheduling software organizes production runs by run and not by day which leads to some challenges. For example:

    If we have a 60hour run of one product that begins at 7/17/23 00:00, then in the report, 7/17/23 will read 60 hours, 7/18/23 will read 0 hours, and 7/19/23 will read 12 hours of whatever product was made next.

    This creates challenges when attempting to provide accurate projections. I need 7/17 to read 24, and then the overflow needs to be distributed among subsequent days until it's used up (7/18 should read 24 and 7/19 should read 12 hours of the product and then 12 hours of whatever followed).

    For simplicty we can use the data set below.

    Thanks,
    Parker
    Attached Files Attached Files
    Last edited by pshaw436; 07-24-2023 at 01:36 PM.

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: How to process surplus amounts in values

    Please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: How to process surplus amounts in values

    @Parker,

    The day before yesterday I posted a solution.
    Since then you have been active on this forum several times, but I have not yet seen a response from you.
    I find that annoying, because I have spent more than an hour of my time to help you further.

    Then I at least expect you to take note of that.

  4. #4
    Registered User
    Join Date
    02-14-2022
    Location
    Harmony, Maine
    MS-Off Ver
    Office 365
    Posts
    28

    Re: How to process surplus amounts in values

    This is quite the complex equation. Thank you for spending your time on it!

    I work at a very busy facility, and I have not had time to even look at what you have given me.

    I'll let you know how it works.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: How to process surplus amounts in values

    Thank you for letting me know. .

    I gladly spent my time on it.
    It was an interesting problem to solve.

    I'm curious about your findings.
    I'll wait until you've had time to look at how the formula works.

    You may have more time left after the implementation of the formula.

  6. #6
    Registered User
    Join Date
    02-14-2022
    Location
    Harmony, Maine
    MS-Off Ver
    Office 365
    Posts
    28

    Re: How to process surplus amounts in values

    Is there a chance that you could explain what this function does in plain text?

    I'm not familiar with Lambda, Filter, Drop, Reduce, Sequence, or Let, so i'm having a difficult time reading it.

    Thanks,
    Parker

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: How to process surplus amounts in values

    The formula first calculates per run, based on the start date and time (b) and the runtime, the expected end date and time (e), and then over which days the run should be spread (s).

    The runtime per day is then determined on the basis of this data.
    This is a maximum of 24 hours, but on the first day and last day, the start time and end time are taken into account and then it is usually less.

    The number of hours per day is multiplied by the corresponding factor.

    After this has been determined for all runs, everything is summed and displayed per day.

    You can find out exactly how all functions in the formula work via "Evaluate formula". Navigate to a formula you want to evaluate and click Formulas --> Evaluate Formula --> Evaluate

  8. #8
    Registered User
    Join Date
    02-14-2022
    Location
    Harmony, Maine
    MS-Off Ver
    Office 365
    Posts
    28

    Re: How to process surplus amounts in values

    This has the potential to be very helpful, so thank you!

    It was difficult to explain my exact problem without divulging proprietary information, so I have some adapting to do to get this to exactly fit my needs. Normally I would pick through the code on my own, and I'm trying, but this has a few new keywords that I am trying to learn & understand

    Do you know why my final array would continue down until it reached 2/21/2024, a date that is not found in the original array?

    Thanks
    Parker

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: How to process surplus amounts in values

    You are Welcome!

    Thanks for your feedback, Glad to have helped.

    If you haven't already, please consider adding reputation to all helpers you think they deserve.
    In that case please click * Add Reputation left below their answers.


    Do you know why my final array would continue down until it reached 2/21/2024
    I don't see your final array,
    but maybe because of a runtime that reaches that far?

  10. #10
    Registered User
    Join Date
    02-14-2022
    Location
    Harmony, Maine
    MS-Off Ver
    Office 365
    Posts
    28

    Re: How to process surplus amounts in values

    Hans,

    I would have given more specific guidance about my unique problem if I knew that the solution was going to be this complex. I can't get it to work for this specific case. Perhaps I could give you some more guidance based on what my sheet currently looks like?

    Are you willing to spend more time on this? If not, that's okay.

    Thanks,
    Parker

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: How to process surplus amounts in values

    Thanks for the feedback and rep

    Please drop here your specific case (without confidential info) with expected results and I (or an other member) will try.
    I like to solve this kind of cases. .

+ 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. Battery Charging/Discharging with Surplus
    By Haiderniaz93 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-15-2023, 02:25 PM
  2. Battery Charging/Discharging with Surplus
    By Haiderniaz93 in forum Hello..Introduce yourself
    Replies: 0
    Last Post: 11-29-2022, 12:25 AM
  3. Applying a calc to a surplus
    By ExcelhelpGB in forum Excel General
    Replies: 1
    Last Post: 04-01-2021, 04:18 PM
  4. [SOLVED] Transfer mathematical surplus from one column to another
    By dranser in forum Excel General
    Replies: 13
    Last Post: 01-09-2021, 02:18 PM
  5. [SOLVED] Split Surplus Funds
    By robotlust in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2020, 10:05 AM
  6. Replies: 2
    Last Post: 09-06-2015, 12:03 AM
  7. Sum the surplus
    By yogeshmaney in forum Excel General
    Replies: 7
    Last Post: 09-05-2009, 08:38 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