I am trying to use the IF function to total a row, if the sum is greater than 40 then the answer given back would be 40. This for a payroll workbook. Any help is appreciated.
=IF(SUM(A1:Z1)>40,40,SUM(A1:Z1)) because you requested an IF function. Better is:
=MIN(40,SUM(A1:Z1))
For whole row substitute IV1 for Z1.
----- Marc wrote: -----
I am trying to use the IF function to total a row, if the sum is greater than 40 then the answer given back would be 40. This for a payroll workbook. Any help is appreciated.
Marc, how about something like this =IF(SUM(A1:J1)>40,"40",SUM(A1:J1))
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
Marc said:
I am trying to use the IF function to total a row, if the sum is greater
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.