Closed Thread
Results 1 to 3 of 3

Need some quick code for calculating output hours

Hybrid View

  1. #1
    Registered User
    Join Date
    01-28-2012
    MS-Off Ver
    Excel 2007
    Posts
    19

    Need some quick code for calculating output hours

    Hello Guys,

    If someone could help me get started on a small piece of code that I am writing, that would be great.
    Here is the problem.

    I have months ( 1 to 12 ). Every month, a set of tasks need to be executed which takes "x" number of hours.
    So if I have 1 machine working 3 hour in the month 1, the total time spent is 3 hours. Fairly simple right !

    But here is where it starts to get a little tricky.
    Say on month 2, a set of tasks take 4 hours. total time that my first machine takes is 4 hours. But i want to introduce 3 new machines
    in this month, which will execute the first month's tasks. So total time spent here is ( 3*3 + 4*1) = 13

    On month 3, task time is 6 hours. And I am introducing 2 new machines.
    So total time is 2*3 ( time taken for 2 new machines to perform first month's tasks ) + 3 * 4 ( 3 new machines introduced last month will now execute second months task) + 6 * 1 ( time the first machine will spend on month 3 s tasks ) = 24

    I need a VBA macro which can help me get started on this.
    Any help will be appreciated !
    I have attached a spreadsheet which forumla's in the section "output hours" but that column will need to replaced with the actual outputs from the VBA code.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-28-2012
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Need some quick code for calculating output hours

    any leads ?

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Need some quick code for calculating output hours

    Thread posted in CS forum hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] quick help needed to massage the output of a
    By James C in forum Excel General
    Replies: 6
    Last Post: 02-27-2013, 06:08 PM
  2. Calculating Remaining Date Time Hours - Error In My Calculation/Code
    By excelnube84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2012, 05:04 AM
  3. Replies: 7
    Last Post: 07-25-2012, 09:14 AM
  4. Timesheet formula for calculating ordinary hours and overtime hours.
    By zoen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2011, 04:23 AM
  5. Replies: 1
    Last Post: 11-29-2011, 12:19 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