View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Concatenation 2 Texts

This should also work, and is better as it fires ONLY when A1 or C1 is
changed

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1,C1"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Range("D12")
.Font.Bold = False
.Value = Range("A1").Value & "-" & Range("C1").Value
.Characters(1, Len(Range("A1").Value)) _
.Font.Bold = True
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

Just remove your code and replace with that, the whole procedure.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hi_no_Tori" wrote in message
...
Hi Bob...

Here is what I am trying to do exactly:

I have a text in cell A1, and another text in cell C1. I need to

concatenate
them in cell D12. The font of the text from A1 should be normal, while the
text from cell C1 should be bold. I need to seperate between the two texts

by
the sign " - ". I need this formatting to happen after I enter or modify

the
text in cell A1 and cell C1.

I tried the code you have provided me with in your last post (the modified
one). Unlike before, it seems to work fine now. When I click on a cell

now,
cell D12 formatting remains the same (i.e. Text from A1 normal, and Text

from
C1 bold). That's basically what I need...

Thank you SO MUCH for your great help Bob. (^_^)