Adding Formatting Instruction to a Formula

  • Thread starter MT DOJ Help Desk
  • Start date
M

MT DOJ Help Desk

Excel 2000

This question is being asked more out of curiosity than out of any real
need. I have the following formula in a cell. The text is oriented
vertically and the column widths are such that I need to put it all in one
cell in order to keep the information together on the page.

=CONCATENATE(A16 & ": " & TEXT(B16,"mmmm") & CHAR(10) & A17 & ": " &
TEXT(B17,"mmmm,yyyy") & CHAR(10) & A18 & ": " & TEXT(B18,"mmmm d, yyyy") &
CHAR(10) & A19 & ": " & TEXT(B19,"mmmm d, yyyy"))

Is there a way to make just one of the lines appear in bold text? Likewise,
is there a way to make just one value appear in red?

--Tom
 
F

Frank Kabel

Hi Tom
unfortunately formulas can't change the Excel environment. This
includes formats as well. So in your case you are not able to change
the format of specific parts of your fourmla's result.
One small hint: In the formula below you can skip the CONCATENATE
function call as you already use the '&' operator. So you may change it
to
=A16 & ": " & TEXT(B16,"mmmm") & CHAR(10) & A17 & ": " &
TEXT(B17,"mmmm,yyyy") & CHAR(10) & A18 & ": " & TEXT(B18,"mmmm d,
yyyy") & CHAR(10) & A19 & ": " & TEXT(B19,"mmmm d, yyyy")
 
M

MT DOJ Help Desk

That's true, I can skip using CONCATENATE. The formula evolved from a
simple one where I was using CONCATENATE, to a more complex formula where I
needed to use &, and I just never thought about taking out CONCATENATE.

I didn't think that what I wanted to do would be possible. But I was
thinking that maybe Excel had commands for turning formats on and
off--similar to HTML tags--that could be embedded in a formula, so I thought
I would ask. That kind of ability would be handy in a situation like mine,
but probably wouldn't be that useful overall.

Thanks for the help.

--Tom
 

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