Forum Discussion
riveter2
Jun 07, 2017Copper Contributor
Nested If function with multiple criteria
In the IF statement =IF(C36>D36,(SUM(D36-C36)),(SUM(D36-C36))) In the 2nd SUM area I want to put the word "Credit" after the result of D36-C36. How can I do this? I am currently using Office 2007. T...
SergeiBaklan
Jun 08, 2017Diamond Contributor
Bit more to previous posts. Yes, as always in Excel you may usually receive result by few different ways.
First, you may simply add the text to number like
= D36- C36 & IF(D36>C36, " Credit",)
Side effects here are
- result will be the text and you can't work with it as the number
- if in previous cells you have some calculations final representation could be not friendly. For example, if you apply above approach to the cell with =10000/3 you will receive something like
3333.333333333 Credit
However, that could be corrected by TEXT() function.
Second approach, you may simply apply custom formatting (use Ctrl+1) for the cell with =D36-C36 like
#,##0.00 " Credit";#,##0.00
Result will be the number, thus you always may continue your calculations with such cell (e.g. balance) and
it always proper formatted like
3,333.33 Credit