View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How set a format on one of more strings in a concatination

Steen

Example only.

Sub CellFont()
With ActiveCell.Characters(Start:=1, length:=5).Font
.ColorIndex = 3
.Bold = True
.Underline = True
.Size = 14
End With
With ActiveCell.Characters(Start:=6, length:=3).Font
.Superscript = True
.ColorIndex = 5
End With
End Sub


Gord Dibben MS Excel MVP

On Sun, 29 Oct 2006 02:03:07 -0800, Steen
wrote:

Thanks Don, but I am sorry to say but I don't fully understand what you are
writing concerning using the Characters Property, could you please give an
example?

A B C
HeadLine1 Decription1 HeadLine+Desc1 C1= (BOLD(A1)&char(10)&B1
HeadLine2 Decription2 HeadLine+Desc2 C2= (BOLD(A2)&char(10)&B2
HeadLine3 Decription3 HeadLine+Desc3 C3= (BOLD(A3)&char(10)&B3
...


"Don Guillett" wrote:


if it is a string like
xxxxyyyyzzzz
then just place your cursor in the FORMULA BOX and highlight what you want
to change. This can be done with a macro using

Characters Property
See Also Applies To Example Specifics
Returns a Characters object that represents a range of characters within the
object text. You can use the Characters object to format characters within a
text string.

expression.Characters(Start, Length)

--
Don Guillett
SalesAid Software

"Steen" wrote in message
...
Any chance that you know how to do the task with converting it to a string
and make the headline bold?

"Don Guillett" wrote:

You can't in a formula. You will need to convert to a string and then you
can bold part of it.

--
Don Guillett
SalesAid Software

"Steen" wrote in message
...
Hi
Can anyone help me with the following problem:

A B C
HeadLine Description Bold(Headline)
Description

I have found the first part of the solution elsewere on the site:
C1 = A1 & Char(10) & B1

But how do I set the Headline in Bold and not the description in C1 -
is
it
possible?