+ Reply to Thread
Results 1 to 8 of 8

Distributing numbers across rows below them

  1. #1
    Registered User
    Join Date
    02-10-2022
    Location
    Mangalore
    MS-Off Ver
    2007
    Posts
    4

    Distributing numbers across rows below them

    Hi,

    I have TABLE A with incoming dates of cargo trains on 2 platforms (Platform 1 and Platform 2). In Table A, a value in Plaform 1 or 2 columns is number of days spent by train on the platform. I need to distribute the number of days a train will spend on the platform across the days the platform was occupied by the train.

    For e.g., if a train comes to Platform 2 on 09-06-2018 and it stays there for 1.23 days, the final table should have 1.00 under Platform 2 on 09-06-2018 and 0.23 under Platform 2 on 10-06-2018.

    In case Platform 2 has an incoming train on 10-06-2018 with stay time as 1.33 days, it would get the remaining day = 1.00-0.23 = 0.77 on 10-06-2018 and the remaining period of stay = 1.33-0.77 = 0.56 should be shown for 11-06-2018.

    I have manually expanded it for the data given in TABLE A and the desired result is shown in TABLE B.

    I need to do this for an entire year of data.

    Kindly help. Thank you!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,441

    Re: Distributing numbers across rows below them

    Welcome to the forum.

    Can I check that you are really using the OLD Excel 2007???
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-10-2022
    Location
    Mangalore
    MS-Off Ver
    2007
    Posts
    4

    Re: Distributing numbers across rows below them

    Thank you

    Yes, my workplace provides me Excel 2007 only.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Distributing numbers across rows below them

    Try pasting the following into cell F3, then drag the fill handle down to cell F16 and then, while F3:F16 are still selected, drag the fill handle over to cell G16:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    02-10-2022
    Location
    Mangalore
    MS-Off Ver
    2007
    Posts
    4

    Re: Distributing numbers across rows below them

    This worked perfectly. Thanks a lot for sharing the solution.

    If it's not too much to ask, could you please share your thought process to arrive at this solution?

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Distributing numbers across rows below them

    The 1 because 100% is the largest portion of a day that a train can spend on a platform.
    The SUM(B$3:B3) to get a cumulative amount of time spent on a platform by the trains.
    The SUM(F$2:F2) to get the cumulative time already distributed in table B.
    MIN because we want the lesser of 1 and the difference between the results of the two SUM functions.
    I hope that makes sense.
    You may get a better idea of how the formula works by selecting a cell, such as F13, and utilizing the Evaluate Formula feature found on the Formulas tab.
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    02-10-2022
    Location
    Mangalore
    MS-Off Ver
    2007
    Posts
    4

    Re: Distributing numbers across rows below them

    Great, it helped me understand how to approach such problems. Thanks a lot.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Distributing numbers across rows below them

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. [SOLVED] Distributing a Stock Value to Multiple Cells (Rows) Based on Product Code
    By Rajeshkumar R in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2019, 02:18 PM
  2. Distributing numbers into sets that maximize their total
    By Aceshigh1 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-26-2018, 03:49 PM
  3. Distributing specified cells over multiple rows
    By sjaakexcel in forum Excel General
    Replies: 1
    Last Post: 02-15-2016, 05:57 AM
  4. Replies: 6
    Last Post: 07-23-2013, 10:23 AM
  5. distributing numbers in a certain time period...
    By gill389 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-20-2012, 06:26 PM
  6. Distributing values from rows to columns for Access import
    By Petterq in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-10-2005, 05:05 PM
  7. [SOLVED] distributing numbers
    By Neil in forum Excel General
    Replies: 1
    Last Post: 04-15-2005, 02:06 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