let’s say I am getting paid 20$ per hour by by my employer and he wants to calculate hours+minutes (not only hours).
if I just want to calculate hours I will use =x*20 in excel
but I want to calculate hours and minutes, let’s say I worked for 1.30 hours, I can use same formula and write 1.30*20= but this doesn't work
the rate in cents is something like 33 cents, how can I just type something like 1.30 (one hour and 30 min) and get the result calculated according to 20$ per hour.
I don’t want to write in minutes because then each time I have to calculate manually then write and it will be messy.
I want to just type hours and minutes in one filed and get the result based on 20$ per hour on the other field. thanks
I use this formula: =ROUND(HOUR(X) + MINUTE(X)/60;2)*20 where X is the cell with the time
I'd use something like: =(TRUNC(x)+MOD(x,1)/0.6)*20
Trunc(x) = hours
Mod(x,1) = fractional part (0.3)
Convert the Mod value to Minutes by dividing by 0.60
Where x = the hour.minute value. (e.g., 1.3 = 1 hour 30 minutes)
This is probably a really long way to do it.
Take the time, as 1.3 for 1 hour 30 mins, remove the minutes and convert to a number you can multiply by, add the hours back and multiply by the hourly rate.
`=(((Time-INT(Time)) * 100/60) + INT(Time))*20
Related
I am having issues understanding which time format to use to show Over Time in minutes and hour format.
I have used "Elapsed minutes' and that worked fine, until I had to deduct the times (J column).
It gives me a number '-85860', and it should give me '480'enter image description here
You need to type the 60 in as 1:00 (one hour), otherwise it will be taken as 60 days (=86400 minutes).
I am working on a data where I have to calculate average time attendance for days of the week or month
Our Data source is Cognos 11
how to get average time in Cognos 11?
Create a list with day of week, etc and your metric - calculated time
Group by day of week
Select from the swing out menu (I think it's the third option) Summarize, then choose average
Depending on the data source/database you will want to convert your start times to the lowest level (maybe minutes)
Either use a timediff function or if you have to, build it yourself (see below for suggestions on how to do that)
To build the number of minutes yourself, see if there are functions like Hour() and Minute() to deconstruct this.
Hours from time = hour([Start Time])
Take the hours and divide by 60
Add this to the minutes. Now you have total minutes
Total Minutes = ([Hours from time] * 60) + [Minute]
Take the average across the users (or whatever grouping you want) to get the average time per week
Average Minutes = average([Total Minutes] for [Work Date])
Then take the average minutes and convert that back to the time
I'm making something in excel which calculates my hours I work a week/month, when a number gets to 30.60 (two shifts which when finishing on the half an hour) it calculates it as 30.60*wage=not the right pay.
so far I have =ROUND(SUM(C6:I6),0) which rounds up the number, which works fine until I have another day which I work till half an hour then it will just show 16 or so.
As you can see here, it calculates it fine until I work 7.30 hours on a wednesday, the total shows 23.00 instead of 23.30.
How can this be done.
Thank you.
your problem is with excel understanding of your "hours". When you write 7.30 you mean 7 hours 30 minutes = 7.5 hours. But excel understands that as 7 hours and 30/100 of hour = 18 minutes. The easiest solution would be to use 7,5 for 7 hours 30 minutes.
(for sake of checking the question off the unanswered I copied my comment)
If you don't want to use 7.5 (Seven-and-a-half-hours) or 7:30 (7 hours, 30 minutes - but remember to multiply this by 24, since Excel stores this as the fraction of a day, 0.3125) then you can use INT and MOD:
=INT(C6)+(MOD(C6,1)/0.6)
The first part, INT(c6) will give you the Integer part (i.e. whole hours) which we don't want to scale/skew.
The second part has 2 stages. First, MOD(c6,1) will give us the Decimal part of the number (i.e. 7.3 will become 0.3) and the second part is to divide by 0.6 to convert from "fake-minutes" to "fraction-of-real-hour"
Finally, since you want to apply the formula to an array of cells, you will need to swap from SUM to SUMPRODUCT:
=SUMPRODUCT(INT(C6:I6)+(MOD(C6:I6,1)/0.6))
But, overall, best option is to use 7:30 and set Data Validation only allow actual Time values in that field.
{EDIT} Of course, this will give your output with 0.5 for 30 minutes. If you want to reverse back to 0.3 for 30 minutes (although, I can scarcely fathom why) then you need to run the same calculation in reverse:
=INT(SUMPRODUCT(INT(C6:I6)+(MOD(C6:I6,1)/0.6))) + 0.6*MOD(SUMPRODUCT(INT(C6:I6)+(MOD(C6:I6,1)/0.6)),1)
I need to change a value of time from days:hours:minutes, into either hours with a decimal or minutes. My data comes up as 001:05:46 for example. I am having trouble with the leading zeros confusing excel. Any help would be great!
Assuming that your value to parse is formatted in DDD:HH:MM like 001:05:46... There are a lot of ways to do this but here's a simple one. To convert into hours we need to take the days times 24 hours per day, add the hours, and add the minutes times 1 hour per 60 minutes:
=LEFT(A1,3)*24+MID(A1,5,2)+RIGHT(A1,2)/60
To get this value in terms of minutes we multiply by 60 minutes per hour. A possible modification of the original formula to reach this point would be:
=LEFT(A1,3)*24*60+MID(A1,5,2)*60+RIGHT(A1,2)
I I'm have small headache caused today by excel and the way it takes control of everything. I have two time values I need to add together then divide by a value I got charged for that time to work out how much it cost me an hour.
so say I was charged day on for 12:30:00
on day 2 I was charged for 13:20:00
and day 3 I was charged for 20:30:00
In total it cost me £1000
The calculation would be
£1000 / (12:30:00 + 13:20:00 + 20:30:00 = 46:20:00)
I would guess to get the answer I would
1000 / Sum(12:30:00+13:20:00+20:30:00) = price per hour
But it doesn't...
I guess I need some sort of convert function on the time or to divide it by 24 to get hours but I'm stuck
Help would be hugely appreciated!
Excel represents times as fractional days, so your function is actually representing the rate per day.
Assuming your times are in cells A1:A3, you can adjust your function to something like:
1000 / Sum(A1:A3) / 24
which will give you the rate per hour (by my calculations, £21.58/hr).
As others have mentioned, you will need to set the cell to a currency format.
Excel should be performing the calculation correctly, but it is just showing as a time. Format the result cell as "number" instead.
You can use the HOUR and MINUTE functions to get the hour and minute portions of the time values, however as lc mentions, you do need to ensure that the formatting of the cell is set to Number, as it will default to a time.
Assuming you have your hh:mm:ss values running down the page (column A), in the next column put the formula
=(A1-INT(A1))*24
underneath this you can put your formula
= 1000 / SUM(A1:A3)
but don't forget to format it as Number.