+ Reply to Thread
Results 1 to 5 of 5

Calculating Employees hours in Macros

  1. #1
    Registered User
    Join Date
    05-21-2014
    Location
    Miami Florida
    MS-Off Ver
    2013
    Posts
    4

    Calculating Employees hours in Macros

    Im doing a spreed sheet to calculate employees hours. I have the employees names in column R and their hours in column S. example R5 = Mike S5 = 8. I need to search column R for all the mike's and total his hours, then move to the next employee and so on... I have already sorted the employees names so that all the names and hours correspond and starting in column R5 and S5 until the proceeding row is blank and then paste the results in column B5 (employee name) and D5(total hours)

    Any help would be appreciated. Thanks
    Last edited by first_n_goal; 05-31-2014 at 10:50 PM.

  2. #2
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Calculating Employees hours in Macros

    You could use a SUMIF formula for this with no sort necessary. For example, in cell D5, enter the following formula:

    =SUMIF(R:R,B5,S:S)

    Then, drag this formula down column D and you will get the total hours for all employees.

  3. #3
    Registered User
    Join Date
    05-21-2014
    Location
    Miami Florida
    MS-Off Ver
    2013
    Posts
    4

    Re: Calculating Employees hours in Macros

    Thanks but i Need a formula to search by name and then calculate the hours in the next column.

    A1 Tara B1 8:00
    A2 Tara B2 6:30
    A3 Steven B3 8:00
    A4 Mike B4 5:30
    A5 Mike B5 7:25

  4. #4
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Calculating Employees hours in Macros

    upload sample workbook
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  5. #5
    Registered User
    Join Date
    05-21-2014
    Location
    Miami Florida
    MS-Off Ver
    2013
    Posts
    4

    Re: Calculating Employees hours in Macros

    I was able to pull the names from the original spreadsheet, sort them according to names I'm just not sure how to calculate their total hours for each week. The problem is the names will be continuously changing according to the schedule, so i need a formula to sort by names and calculator their hours on the following column. and paste there names in column B5 and there hours in C5 and so on....

    Thanks in advance for all you guys help.
    Attached Files Attached Files

+ 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. Replies: 5
    Last Post: 07-19-2012, 05:00 PM
  2. Replies: 5
    Last Post: 03-07-2011, 06:38 PM
  3. Adding Employees Hours from Different Cells
    By talacal in forum Excel General
    Replies: 30
    Last Post: 01-12-2011, 10:42 PM
  4. Replies: 4
    Last Post: 11-28-2010, 11:00 PM
  5. [SOLVED] employees hours
    By karen in forum Excel General
    Replies: 2
    Last Post: 09-14-2005, 11: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