IF statement result joining text & formula

Microsoft Office excel 2007 home & stude...
June 19, 2010 at 12:50:17
Specs: Windows XP
Hi All
I am trying to write an IF statement that links a text
string and a formula into the result but am not having
much success.
I have a simple profit and loss worksheet with Income
in F2 and costs in F3. I wish for the IF statement to
check whether costs are larger than income, if so I
would like the text to display "You are over budget
by"... and then perform the formula costs-income. I
have written it like this;
IF(F3>F2,"You are over budget by" F3-F2,"You are
under budget by" F2-F3)
but this is not accepted by excel.

Any ideas?
Thanks Paul

See More: IF statement result joining text & formula

June 19, 2010 at 13:01:44
=IF(F3>F2,CONCATENATE("You are over budget by ",F3-F2),CONCATENATE("You are under budget by ",F2-F3))

Insomniac at large

Report •

June 19, 2010 at 13:12:24
Superb, many thanks!!

Report •

June 19, 2010 at 13:14:40

Convert the calculation of difference from a value into text and specify a number format, then add an ampersand between the text and the calculation to join the two together:

,"You are over budget by " & Text(F3-F2,"#0.00"),

Repeat for the value if false.

Using TEXT() gives you control of how the number will be displayed. ,"You are over budget by " & F3-F2, will work but the number format is not settable.


Report •

Related Solutions

June 19, 2010 at 13:26:14

Report •

June 19, 2010 at 15:15:05
Oh that one's much easier!!

Report •

Ask Question