different fonts when I concatenate

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

Guest

I am concatentating a group of Excel cells. The first cell has bold font and
when I concatenate it, the bold disappears. Also, need to put a return in
the formula to get second cell to go to next line. Can anyone help me?
 
If you want to CONCATENATE say A1 and B1, put a space and an Alt-Return in a
helper cell, say C1, then

=A1&C1&B1 will give you your second line in the target cell...........

If you want the BOLD, the only thing I know to do is to set the whole target
cell to BOLD.

Vaya con Dios,
Chuck, CABGx3
 
In order to bold the first part of the concatenation, you'll need an
event macro instead of a formula. One way:

Put this in the worksheet code module (right-click on the sheet tab and
choose View Code):


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("A1, C1")) Is Nothing Then
With Range("D1")
.Font.Bold = False
Application.EnableEvents = False
.Value = Range("A1").Text & vbLf & Range("C1").Text
Application.EnableEvents = True
.Characters(1, Len(Range("A1").Text)).Font.Bold = True
.WrapText = True
End With
End If
End Sub


Change the cell references to suit.
 

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