View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Hi_no_Tori Hi_no_Tori is offline
external usenet poster
 
Posts: 17
Default Concatenation 2 Texts

Hi Bob...

I've just tried the code, and It's working perfectly. Many, many thanks
indeed. Thanks to you Bob, my problem is now solved. (^_^)

"Bob Phillips" wrote:

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