if then formula

R

rich123456

i have a formula in a cell that totals the amounts in that row.

here is the formula

=((J48-M48)*L48)+(K48*L48)

i need help adding this to this formula....

"if the total is less than 0 then use the number in L48"

any help here would be greatly appreciated
 
R

Rich/rerat

rich123456

=IF(SUM($J48:$K48,$M48)*$L48<0,$L48,SUM($J48:$K48,$M48)*$L48)

"if you want to include 0 to have L48 as your solution then try this":

=IF(SUM($J48:$K48,$M48)*$L48<=0,$L48,SUM($J48:$K48,$M48)*$L48)

--
Rich/rerat
(RRR News) (message rule)
((Previous Text Snipped to Save Bandwidth When Appropriate))



i have a formula in a cell that totals the amounts in that row.

here is the formula

=((J48-M48)*L48)+(K48*L48)

i need help adding this to this formula....

"if the total is less than 0 then use the number in L48"

any help here would be greatly appreciated.
 
R

Rich/rerat

rich123456,
This a Correction of earlier posting, I did include for M48 being negative.

=IF(SUM($J48:$K48,-$M48)*$L48<0,$L48,SUM($J48:$K48,-$M48)*$L48)

"if you want to include 0 to have L48 as your solution then try this":

=IF(SUM($J48:$K48,-$M48)*$L48<=0,$L48,SUM($J48:$K48,-$M48)*$L48)



--
Rich/rerat
(RRR News) (message rule)
((Previous Text Snipped to Save Bandwidth When Appropriate))



i have a formula in a cell that totals the amounts in that row.

here is the formula

=((J48-M48)*L48)+(K48*L48)

i need help adding this to this formula....

"if the total is less than 0 then use the number in L48"

any help here would be greatly appreciated.
 
J

joeu2004

rich123456 said:
=((J48-M48)*L48)+(K48*L48)
i need help adding this to this formula....
"if the total is less than 0 then use the number in L48"

=IF((J48-M48+K48)*L48<0,L48,(J48-M48+K48)*L48)

I took the liberty of making some algebraic simplifications as well.

If all of the values in J48, K48, L48 and M48 are non-negative, you can
simplify the IF() expression as follows:

=IF(J48+K48<M48,L48,(J48-M48+K48)*L48)
 
R

rich123456

Rich/rerat;1601105 said:
rich123456


=IF(SUM($J48:$K48,$M48)*$L48<0,$L48,SUM($J48:$K48,$M48)*$L48)

"if you want to include 0 to have L48 as your solution then try this":

=IF(SUM($J48:$K48,$M48)*$L48<=0,$L48,SUM($J48:$K48,$M48)*$L48)

--
Rich/rerat
(RRR News) (message rule)
((Previous Text Snipped to Save Bandwidth When Appropriate))



i have a formula in a cell that totals the amounts in that row.

here is the formula

=((J48-M48)*L48)+(K48*L48)

i need help adding this to this formula....

"if the total is less than 0 then use the number in L48"

any help here would be greatly appreciated.

it worked !!!!

thanks so much for the help.
I'm somebody now
 

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

Top