Excell IF Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
than 40 then the answer given back would be 40. This for a payroll
workbook. Any help is appreciated.
 
Hi Marc!

If it's for an entire row:

=IF(SUM(1:1)>40,40,SUM(1:1))

But if it's just for a row of a table:

=IF(SUM(A1:Z1)>40,40,SUM(A1:Z1))

--
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.
 

Ask a Question

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.

Ask a Question

Similar Threads


Back
Top