Combine text with formula in same cell?

T

The Wolf

Is it possible to have text in the same cell with a formula?

=C6/(MIN(TODAY(),DATE(2004,4,30))-DATE(2004,4,0)) Over Budget

With "Over Budget" being the text I want to add to the cell.

It is not possible to add the text to the adjoining cell because the
template has several rows merged, unmerging the rows is not a viable option.
 
B

Bernard Rey

The Wolf wrote :
Is it possible to have text in the same cell with a formula?

=C6/(MIN(TODAY(),DATE(2004,4,30))-DATE(2004,4,0)) Over Budget

With "Over Budget" being the text I want to add to the cell.

One way could be to:
- select your cell
- from the "Format" menu, "Cells..." item, click on "Number" > "Custom"
- in the "Type:" zone, type:

#,##0.00" Over Budget"

thus creating a custom style.
It is not possible to add the text to the adjoining cell because the
template has several rows merged, unmerging the rows is not a viable option.
The next problem might be that if the cell isn't wide enough, it won't
display. So you may have to merge cells, whick may be problematic too

Another way could then be to have another cell referring to your result
cell, with a formula like this (supposing your formula is in C7):

=ROUND(C7,2) & " Over Budget"
 
T

The Wolf

The Wolf wrote :


One way could be to:
- select your cell
- from the "Format" menu, "Cells..." item, click on "Number" > "Custom"
- in the "Type:" zone, type:

#,##0.00" Over Budget"

thus creating a custom style.

Thanks, that worked. Could it go a step further and read "Under Budget" if
the percentage was less than 0?

Such as -5% Under Budget
 
J

JE McGimpsey

The Wolf said:
Thanks, that worked. Could it go a step further and read "Under Budget" if
the percentage was less than 0?

Such as -5% Under Budget

XL's custom format has 4 fields, separated by semicolons. By default,
the first is for positive numbers, the second for negative numbers, the
third for zero and the fourth for text, so you could use

#,##0.00" Over Budget";#,##0.00" Under Budget";#,##0.00" On Budget";@
 

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

Top