4 Replies Latest reply: Nov 6, 2011 5:40 AM by Schrodinger56
Level 1
Mac OS X

Is it possible to create a Rule so that after performing a calculation you can add the words 'in credit' or 'in debit' after the calculated figure?

For example if the result of the calcualtion is >0 then the words 'in credit' appear after the figure or is the result of the calculation is <0 then the words 'in debit' appear after the figure.

All I've managed to work out with respect to creating rules is changing the colour of the text etc.

Thank you

Solved by Wayne Contello on Nov 6, 2011 4:18 AM Solved

You can have a new column which show "in debt" or "in credit"... this is not achived through formatting.

=IF(C2<0, C2&" in debt", C2&" in credit")  If you do not want the numeric amount you could change the formula I provided as follows:

=IF(C2<0, " in debt", " in credit")

I hope this helps

#### All replies

• Level 6
iWork

You can have a new column which show "in debt" or "in credit"... this is not achived through formatting.

=IF(C2<0, C2&" in debt", C2&" in credit")  If you do not want the numeric amount you could change the formula I provided as follows:

=IF(C2<0, " in debt", " in credit")

I hope this helps

• Level 1
Mac OS X

Thanks very much Wayne.  I've no idea how your formula works but it's just the job.

I opted for the latter version.

• Level 6
iWork

the IF function has three argument:

IF(<TEST>, <RETURN WHEN TRUE>,<RETURN WHEN FALSE>)

so, breaking the formula I provided down into its' parts:

=IF(C2<0, " in debt", " in credit")

<TEST> is "C2 < 0" will be "TRUE" when the value in C2 is strict;y less than 0, other wise will return "FALSE"

<RETURN WHEN TRUE> is " in debt"

<RETURN WHEN FALSE> is " in credit"

• Level 1
Mac OS X

Thanks for explaining that.  And thanks for not just directing me to the Numberds Guide