Formatting within formulas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to make certain text within a cell bold. This is normally
straight forward when everything in a cell is text, the trouble lies when the
text to be displayed is dependent on formula.
For example, if A1="Mr" and B1="Smith". I can make cell B2 refer to cells A1
and B1 to display "How is Mr Smith today?", with the following code:
B2= "How is " & A1 & " " & B1 & " today?"
However, I'd like to be able to display only the text "Mr Smith" in bold. Is
there a simple way to amend the formula above to make this happen?
 
Cells with formulas can't be formatted this way.
I would like to make certain text within a cell bold. This is normally
straight forward when everything in a cell is text, the trouble lies when the
text to be displayed is dependent on formula.
For example, if A1="Mr" and B1="Smith". I can make cell B2 refer to cells A1
and B1 to display "How is Mr Smith today?", with the following code:
B2= "How is " & A1 & " " & B1 & " today?"
However, I'd like to be able to display only the text "Mr Smith" in bold. Is
there a simple way to amend the formula above to make this happen?
 
Without resorting to VBA, you could achieve this by putting the
following in the cells spedified:

B2: "How is "
C2: =A1&" "&B1
D2: " today?"

Strictly speaking, you don't need the quotes in B2 and D2, but I've
included them to show that you need the spaces (or you could put them
in the formula in C2). Then set C2 to bold and adjust the column
widths so that B2:D2 looks like a continuous text string.

Hope this helps.

Pete
 

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

Back
Top