Closed Thread
Results 1 to 3 of 3

Given an array with start and stop date and time, allocate total cost proportional to hrs

  1. #1
    Registered User
    Join Date
    03-06-2016
    Location
    Boston, USA
    MS-Off Ver
    Office 15
    Posts
    4

    Given an array with start and stop date and time, allocate total cost proportional to hrs

    Hi,

    I am working on a problem in which I have an array of start and stop dates (mm/dd/yyyy) and time (24 hour format) and a total cost, for example:
    Start date Stop Stop Total Cost
    Row1 3/4/2016 14:00 3/6/2016 08:00 4200
    Row2 3/6/2016 16:00 3/6/2016 18:00 200

    I want to proportionally allocate the cost to the date based on time used up on that date and then add up and display total cost from multiple columns for that date. In the example above, in Row1 we have total of 42 hours, for date 3/6/2016 we have 8 hours of run, therefore proportionate cost for 3/6/2016 will be 8/42*42000 = 800 and from Row2 since it only has 3/6/2016, cost for 3/6/2016 will be 200. Therefore total for 3/6/2016 will be 800+200 = 1000. I have a separate column of 365 days where I need to display 1000 in front of 3/6/2016. Please let me know if somebody can help me with finding an elegant solution for this. Thanks!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Given an array with start and stop date and time, allocate total cost proportional to

    Welcome to the Forum, unfortunately:

    This is a triplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Given an array with start and stop date and time, allocate total cost proportional to

    welcome to the forum himani25gupta

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 02-15-2015, 07:32 PM
  2. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  3. Replies: 2
    Last Post: 12-09-2013, 11:02 PM
  4. Array function to allocate total across accounts based on prioritization
    By lpcapital in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-29-2013, 04:56 PM
  5. [SOLVED] Allocate total price by term taking account start and end date and month affected
    By continue101 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2013, 01:47 PM
  6. Replies: 3
    Last Post: 09-26-2012, 09:43 AM
  7. Cost Driver Analysis - Need formula to allocate manpower cost
    By Swastik Banerje in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2009, 11:16 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