returning only positive values?

NuWest

Board Regular
Joined
Oct 24, 2002
Messages
95
Hi i have a quick question for anyone. I am currently using excel for a project in my payroll class, where we were give, employee salary abouts and 4 pay dates and then we have to re-create employee registers and payroll registers. my problem is in the payroll register sheet, specifically the portion that shows taxable earnings. I am currently using the formula:

=IF(SUM('Hunter, James'!$I$12:$I$16)<'Company Information'!$C$13,SUM('Hunter, James'!$I$12:$I$16),('Company Information'!$C%13-SUM('Hunter, James'!$I$12:$I$16)))

but the problem with that is that once an employee has gone over a limit for taxable earnings, this formula returns a negative number. instead of returning a negative number i want it to just return 0. but other than that this formula works spectacular for all employees that have NOT hit the taxable limit yet.

any help anyone???????????????????
thanks in advance.
kristen.

edit---in the formula above,
"'Hunter, James'!$I$12:$I$16" refers to the total of the wages paid so far in the year.
"'Company Information'!$C$13" refers to the actual taxable limit.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
If functions work like IF...Then...Else or If(test_condition,if_true, if_false)
Add another comma and just add 0

Code:
=IF(SUM('Hunter, James'!$I$12:$I$16)<'Company Information'!$C$13,SUM('Hunter, James'!$I$12:$I$16),('Company Information'!$C%13-SUM('Hunter, James'!$I$12:$I$16)),0)
 
Upvote 0
Why not add another condition to your formula IF(SUM <=0,0,ELSE)

Although posting an example of youir sheet will get you a cleaner formula.

And is there any way to get the hardcoded name out of your formula and reference an employee table? Any turnover whatsoever will have you manually recalculating all of your formulas by hand.

Hope that helps,

Smitty
 
Upvote 0
Try this

=Max(=IF(SUM('Hunter, James'!$I$12:$I$16)<'Company Information'!$C$13,SUM('Hunter, James'!$I$12:$I$16),('Company Information'!$C%13-SUM('Hunter, James'!$I$12:$I$16))),0)

So it will return the max of the number and zero.
 
Upvote 0
this is what the portion of the spreadsheet i am having trouble looks like. and i am not sure i know what "hardcoded" names are. if it is reference to the employees name, each employee is set on a seperate sheet that only includes their personal payroll data. and the name of their sheets are their names. i should also note, that some of the formulas in the first column are incorrect, i just havent corrected them yet.... the formua i am working with is currently in Z20.
 
Upvote 0

Forum statistics

Threads
1,214,534
Messages
6,120,080
Members
448,943
Latest member
sharmarick

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