4 Replies Latest reply: Nov 6, 2011 5:40 AM by Schrodinger56
Schrodinger56 Level 1 Level 1 (30 points)

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

  • Wayne Contello Level 6 Level 6 (15,055 points)

    Screen shot 2011-11-06 at 6.15.56 AM.png

     

    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

  • Schrodinger56 Level 1 Level 1 (30 points)

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

     

    I opted for the latter version.

  • Wayne Contello Level 6 Level 6 (15,055 points)

    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"

  • Schrodinger56 Level 1 Level 1 (30 points)

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