+ Reply to Thread
Results 1 to 6 of 6

calculate 'wage' from number of hours worked between x and y hours

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    1

    calculate 'wage' from number of hours worked between x and y hours

    Hi,

    I making a spreadsheet to use as a diary planner for part time staff at my current place of work, and i have just been asked to add the wages they earn each shift but really struggling with getting it to calculate when there shift ends on the half hour.. ..

    In the example below, you can see what i mean. The shift which finished with a whole hour, calculates fine, the Shift which finishes with half an hour in it calculates incorrectly

    Screen Shot 2014-12-18 at 23.39.22.png

    How can i get the Wages column(E2 for example) to calculate the wages correctly as it should be £17.50.

    For reference the formula i use for calculating E2 is as follows - =IF(D2="Y",(C2-B2)*A2,"")

    wages.xls
    Attached Images Attached Images

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: calculate 'wage' from number of hours worked between x and y hours

    Cells B2:C3 are formatted as numbers, not time. So half hours should be entered as 0.5, not 0.30

    If you would prefer to enter the hours as "time", then you'll need to change the cell format accordingly and adjust your E2 formula to:

    Please Login or Register  to view this content.
    Cheers,
    Last edited by ConneXionLost; 12-18-2014 at 08:02 PM.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: calculate 'wage' from number of hours worked between x and y hours

    You are confusing time formats with decimals

    21.3 in C2 is a decimal and means 9:20 in time.

    Try typing 21.5 into C2
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: calculate 'wage' from number of hours worked between x and y hours

    if you modify your formula in E2 to round up to the nearest .5

    Then you may have a solution.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-22-2015
    Location
    london
    MS-Off Ver
    mac
    Posts
    1

    Cool Re: calculate 'wage' from number of hours worked between x and y hours

    try having a ghost column which is gonna calculate the hour difference + converting to decimal ( you can narrow these down very small then you don't even see after you type the formula then drag them down )

    move your columns to the right from so d,e is empty ( d-->f+ e-->g)

    in d2 =c2-b2
    in e2 =hour(d2)+minute(d2)/60 make sure this cells are time formatted
    in g2 =if(e2="y" ,e2*a2)

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,913

    Re: calculate 'wage' from number of hours worked between x and y hours

    =(INT(MOD(C2-B2,24))+MOD(MOD(C2-B2,24),1)*100/60)*A2*(D2="Y")

    Try this formula
    Please Login or Register  to view this content.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

+ 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: 2
    Last Post: 01-17-2014, 02:22 PM
  2. Replies: 4
    Last Post: 02-12-2013, 07:01 AM
  3. Replies: 2
    Last Post: 02-11-2013, 02:26 PM
  4. [SOLVED] How do I calculate the number of night hours worked
    By Somlal22 in forum Excel General
    Replies: 3
    Last Post: 08-17-2012, 07:18 AM
  5. Replies: 0
    Last Post: 05-14-2012, 05:36 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