Solved

# Excel 2010 IF function

Posted on 2011-10-27
Medium Priority
207 Views
Hi,
I’m working with my dad to help him resolve problems in his company, I need to be able to calculate gross pay using IF function.
Dept. 1 employees receive straight time for 40 hours or less and double time for hours over 40.
Dept. 2 employees received straight time for 40 hours or less and Tripe time for hours over 40.
Thank you,

Name
Dept.             Rate               Hours                         Gross Pay
Sally Wed          1                 10                   20
Joe Reed           2                 10                   50
Jill Smith            1                 20                   44

0
Question by:perla1962

LVL 39

Accepted Solution

nutsch earned 2000 total points
ID: 37043215
=C2*(MIN(D2,40)+MAX(D2-40,0)*IF(B2=2,3,2))
should do it

MIN(D2,40) gets you the number of straight hours
MAX(D2-40,0) gets you the number of overtime hours
IF(B2=2,3,2)) gets you 3 for department 2, and 2 otherwise

Thomas
0

Author Closing Comment

ID: 37043333
Yes that is correct thank you, I made a minor mistake and you got it right.
0

LVL 43

Expert Comment

ID: 37043381
to further simplify by eliminating the if simply replace

IF(B2=2,3,2)

by

(4-b2)
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
###### Suggested Courses
Course of the Month14 days, 15 hours left to enroll