ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   different fonts when I concatenate (https://www.excelbanter.com/excel-discussion-misc-queries/25740-different-fonts-when-i-concatenate.html)

rivgrl85

different fonts when I concatenate
 
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?

CLR

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




"rivgrl85" wrote in message
...
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?




JE McGimpsey

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.



In article ,
"rivgrl85" wrote:

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?



All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com