View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tyro[_2_] Tyro[_2_] is offline
external usenet poster
 
Posts: 1,091
Default Function IF statement

Mistake. I corrected it. To obfuscate serves no purpose. I believe in the
KISS principle.

Tyro

"T. Valko" wrote in message
...
Why make it so complex?


I guess complexity is a matter of opinion.

At least my formula returns the *correct* result! <g

Your formula returns the incorrect result when hours 40.

Hours = 48
Rate = 10
OT rate = 15

Reg hours = 40*10 = 400
OT hours = 8*15 = 120

Total pay = 520
Your formula = 600

Are you hiring? I'd love to work for you! <BG

--
Biff
Microsoft Excel MVP


"Tyro" wrote in message
...
Why make it so complex? with Min Max?? Just take the hours <= 40 at
straight time and then over 40 at time & a half.

Tyro

"T. Valko" wrote in message
...
Try this:

=IF(C2="",0,MIN(C2,40)*D2+MAX(C2-40,0)*(D2*1.5))

--
Biff
Microsoft Excel MVP


"Raymond" wrote in message
...
I need to know how to get this column to say: If the hours worked are
more
than 40 then take time and a half and multiply that times the
difference
between the hours worked and 40 and in that same cell add the regular
hour to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the
IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond