?
Solved

Excel 2010 IF function

Posted on 2011-10-27
3
Medium Priority
?
207 Views
Last Modified: 2012-05-12
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
Comment
Question by:perla1962
3 Comments
 
LVL 39

Accepted Solution

by:
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

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

Expert Comment

by:Saqib Husain, Syed
ID: 37043381
to further simplify by eliminating the if simply replace

IF(B2=2,3,2)

by

(4-b2)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question