General Help

ehlfb

New Member
Joined
Aug 9, 2011
Messages
37
Dear All,

I have in Cell A2 132:23 hours, I need to calculate in Cell B2 the following:

First 60 Hours at the rate of 3
Second 60 hours at the rate of 5
anything > 120 at the rate of 9

the total should be 591.45

Can anyone help me please?.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
can you show how you have derived your answer

eg (60*3) + (60*5) + (12.23 *9)
 
Upvote 0
Try this, substitute B2 into the formula (instead of A11)

=IF(A11<60,A11*3,IF(AND(A11>60,A11<120),(60*3+(A11-60)*5),IF(A11>120,(60*3+60*5+(A11-120)*9))))
 
Upvote 0
I split out the formulas into 3, then added up those values:
(on my workings I used cells A4 to A7 to host the formulas)

'=IF(A2>0,IF(A2<60,SUM(A2*3),IF(A2>60,SUM(60*3),""))) - for the 1st 60
'=IF(A2>60,IF(A2<120,SUM(A2-60)*5,IF(A2>120,SUM(60*5),""))) - for the 2nd 60
'=IF(A2>120,SUM(A2-120)*9,"") - for the 3rd 60
'=SUM(A4:A6) - to provide a total for the above calculations

I make the answer 590.07 though...
 
Upvote 0
Hi Jimrward,

Actually I calculated manually

60 hours * 3 = 180
60 hours * 5= 300
12 hours and 23/60 minutes becames 12 +38/100 * 9 = 111.45
This gives the total of 591.45
 
Upvote 0
Try this. After entering the formula, you may need to format the cell as Number.

=A2*24*3+MAX(A2*24-60,0)*2+MAX(A2*24-120,0)*4
 
Upvote 0
But are we not saying that 132.23 is:

One hundred and thirty-two hours and 23 minutes? Therefore, you wouldn't need to consider the 23 as a fraction of 60 for the calculation!?

Might be having a bald moment, but think I'm missing something otherwise..
 
Upvote 0
But are we not saying that 132.23 is:

One hundred and thirty-two hours and 23 minutes? Therefore, you wouldn't need to consider the 23 as a fraction of 60 for the calculation!?

Might be having a bald moment, but think I'm missing something otherwise..
Yes, I think you haven't looked closely enough at the original data. It is a time, not a decimal number.
I have in Cell A2 132:23 hours,
 
Last edited:
Upvote 0
Ignore me! Sorry... Must just be one of those days

Thank you for clarifying Peter

But are we not saying that 132.23 is:

One hundred and thirty-two hours and 23 minutes? Therefore, you wouldn't need to consider the 23 as a fraction of 60 for the calculation!?

Might be having a bald moment, but think I'm missing something otherwise..
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,239
Members
452,898
Latest member
Capolavoro009

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top