Calculating with 2 different formats

B

bytjie06

I have 2 fields that I am trying to do calculations with.
The one field has a format of time ([h]:mm) and the other is number (value
represents kilograms).
I am trying to do a calculation where the kg/hour needs to be calculated.
But my answer always comes out wrong.
It seems as though the time format saves the numerical value differently.
Example:
Time begin - 08:00
Time ended - 12:00
I did a calc for the difference and got 4:00 which is fine.
This difference is now multiplied by the amount of people that worked that
shift i.e. 4.
I then get the answer 16, which is also fine.
Now I need to calc the kilograms per hour.
Say for instance the kg is 300kg, the calc should get an answer of 18.75.
However I get the answer as 450 which is obviously way out.
when I convert the 16 hours worked in total to number format, instead of
giving me 16, I get 0.67.
What must I do to overcome this?
 
L

Lars-Åke Aspelin

I have 2 fields that I am trying to do calculations with.
The one field has a format of time ([h]:mm) and the other is number (value
represents kilograms).
I am trying to do a calculation where the kg/hour needs to be calculated.
But my answer always comes out wrong.
It seems as though the time format saves the numerical value differently.
Example:
Time begin - 08:00
Time ended - 12:00
I did a calc for the difference and got 4:00 which is fine.
This difference is now multiplied by the amount of people that worked that
shift i.e. 4.
I then get the answer 16, which is also fine.
Now I need to calc the kilograms per hour.
Say for instance the kg is 300kg, the calc should get an answer of 18.75.
However I get the answer as 450 which is obviously way out.
when I convert the 16 hours worked in total to number format, instead of
giving me 16, I get 0.67.
What must I do to overcome this?

Divide by 24 (which is the number of hours per day).

Hope this helps / Lars-Åke
 
B

bytjie06

Thanx
Problem fixed in no time

Jacob Skaria said:
=Kilogram/(hours*24)

If this post helps click Yes
---------------
Jacob Skaria


bytjie06 said:
I have 2 fields that I am trying to do calculations with.
The one field has a format of time ([h]:mm) and the other is number (value
represents kilograms).
I am trying to do a calculation where the kg/hour needs to be calculated.
But my answer always comes out wrong.
It seems as though the time format saves the numerical value differently.
Example:
Time begin - 08:00
Time ended - 12:00
I did a calc for the difference and got 4:00 which is fine.
This difference is now multiplied by the amount of people that worked that
shift i.e. 4.
I then get the answer 16, which is also fine.
Now I need to calc the kilograms per hour.
Say for instance the kg is 300kg, the calc should get an answer of 18.75.
However I get the answer as 450 which is obviously way out.
when I convert the 16 hours worked in total to number format, instead of
giving me 16, I get 0.67.
What must I do to overcome this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top