Forum Discussion

Chapman Simon's avatar
Chapman Simon
Copper Contributor
Dec 13, 2017

Multiplying time (for wage calculations).

Hi.

I’m new to the community (and a bit of an excel amateur). Just joined as I have an issue which I think is quite simple, but to which I can’t find a solution.

Basically I’m trying to add up hours worked, and then multiply those hours by an hourly wage.

In order to make Excel tot-up the hours worked beyond 24, I’m using the custom cell format, [h]:mm. This is giving me the correct total hours and minutes worked (minutes are being rounded to the nearest 15 prior to input). However, when I try to multiply this total by the hourly wage, I’m getting an inaccurate (way too low) result. So, even though excel is displaying the time correctly, it is still considering it as a fraction.

After some online research, I managed to get the right result by using the formula =TEXT(V5, "[h]")*100. V5 is the cell with the total hours worked, in [h]:mm format, and 100 is the hourly wage.

However, this is only giving me the correct result to the nearest hour. So for example if the total (in V5) is 10:00 (ten hours), then the wage total is being correctly given as 1000. However, it the total is 10:30 (ten and a half hours), the total is still being given as 1000, instead of 1050.

I assumed this is because I am using just “[h]” in the formula, but if I try using “[h]:mm” (so, =TEXT(V5, "[h]:mm")*100), then I am just getting the same fraction-based incorrect result (with 10 and a half hours and 100 per hour, the result is coming out at 43.75, not 1050).

So, now I’m stuck. I’ve tried several things but haven’t found a solution. I imagine there’s a simple way to solve this that I’m just unaware of.

Apologies for the long explanation, and thanks in advance for your advice.

Simon

  • Chapman,

     

    It's simpler than you imagine!

     

    This little formula is all you need:

    =A2*24*B2

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Chapman,

     

    It's simpler than you imagine!

     

    This little formula is all you need:

    =A2*24*B2

    • Chapman Simon's avatar
      Chapman Simon
      Copper Contributor
      You're a hero.
      I was expecting there to be a simple solution, but not that simple! Haha.
      Thanks very much.
    • Mindanser's avatar
      Mindanser
      Copper Contributor

      Haytham Amairah 

      Your answer works great until the number of hours worked is greater than 24.  For example, if you put 25:00 into the time column, it automatically converts to 1:00 and the pay column is reduced to one hour's pay.

      I haven't found the proper solution yet.

Resources