Results 1 to 9 of 9

VBA Calculate Working Number of Days

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Calculate Working Number of Days

    Hi, I wonder whether someone could help me please.

    I'm using the following sheet layout to display staff resource detail
    COLUMN B COLUMN C COLUMN D COLUMN E COLUMN F COLUMN G COLUMN H COLUMN I COLUMN J COLUMN K COLUMN L COLUMN M COLUMN N COLUMN O COLUMN P COLUMN Q
    ROW 3 22 23 20 23 22 21 23 21 22 23 20 21
    ROW 4 Description Apr-13 May-13 Jun-13 Jul-13 Aug-13 Sep-13 Oct-13 Nov-13 Dec-13 Jan-14 Feb-14 Mar-14 Actual Hours Total Mandays Total FTE Total
    ROW 5 Project 1 1155.14 1463.71 1615.53 1333.76 232.01 32.05 NEW FORMULA

    What I'm trying to do, is add a formula via VBA in the "FTE" column (Labelled as NEW FORMULA in the above table), which performs the following:

    • Search row 4 in columns C:N and find the month which matches the current month.
    • When a match is found, take the corresponding value from row 3 and multiply this value by the value in column P.
    • So using the above as an example, the formula in column Q on row 5, would be 22 (Because we are in August) multiplied by 32.05 (Cell P5) giving a total of 705.10.

    I've attached a file which perhaps illustrates this better than I can explain, and I've started the code in VB editor, but it's just the formula that I'm having difficulty in working out.

    I just wondered whether someone could look at this please and offer some guidance on how I may go about achieving this.

    Many thanks and kind regards
    Attached Files Attached Files
    Last edited by hobbiton73; 08-31-2013 at 08:49 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Calculate the number days between two user input days.
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2013, 10:44 PM
  2. Calculate total working days and excepted leave days
    By megaiooo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2013, 09:29 AM
  3. Need to calculate working days
    By bryanshiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-12-2013, 07:47 AM
  4. calculate net working days
    By mpkishore in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2007, 07:17 AM
  5. calculate number of working days
    By philc in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 03:05 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