Cell wording should change if result is +ve or -ve

  • Thread starter Thread starter karambos
  • Start date Start date
K

karambos

I have a calculation with one cell containing the result. The wording
next to the cell should read

"Jane owes Peter:" if the result of the calculation is positive
and
"Peter owes Jane:" if the result is negative but it should show the
absolute value.

I am grateful for any help
 
=if(a1=b1,"No debt",if(a1<b1,"Jane owes Peter: ","Peter owes Jane: "))
& text(abs(a1-b1),"$0.00")

You can use the text() worksheet function to give the difference a nice format.

=if(a1=b1,"No debt",if(a1<b1,"Jane owes Peter: ","Peter owes Jane: "))
& text(abs(a1-b1),"$0.00") & " due on: " & text(c1,"mm/dd/yyyy")

(if you had the date in C1)
 

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

Back
Top