Matt Wilhelm - Feb 6, 2010 at 04:03 PM
 Matt Wilehlm - Feb 9, 2010 at 02:02 AM

I have this formula and I am trying to get it to calculate my overtime wage and my regular wage in the same cell. V16 is my overtime pay and V15 is my regular pay. The first part of the equation which is for my overtime works correctly but I can't seem to get the last half to calculate regular pay. If anyone has any idea they are greatly appreciated.



2 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Feb 6, 2010 at 08:01 PM
=IF(SUM(AE14)>40,(SUM(AE14)-40)*V16)+IF(SUM(AE14)<=40,-SUM(AE14>40,(SUM(AE14)*V15))) [/QUOTE]

Instead of giving your equation you should have given the logic
Let me phrase the logic

If AE14 is greater than forty the cell should have the value of
Otherwise (means that if AE14 is less than equal to 40 then the value should be

If this logic ok then the equation is


suppose AE14 is 45(more than 40),V16 is 20 and V15 25

then the above equation will give 1225

suppose AE14 is 35(less than or equal to 40) (naturally V15 and V16 remain the same the above equation will give 875

now I do not know whether you want to find this calculation for one person or for a number of people.
How is your database configured

OK so the terminology is right but the formula still doesn't seem to want to work. I was able to tweak it to look like this and it works great and comes up with all the correct numbers except when my employee works less than 40 hours and than it just gives a 0 as a total instead of their hours worked. I hope this is enough information, I really do appreciate the help from all.

Again I want the formula to calculate all of my hours that are equal to, or less than 40 and multiply that number by v5 to get me total regular wages without overtime.