Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenation 2 Texts
Suppose I have two Texts: "Text1" in A1 and "Text2" in C1. I want to make a
concatenation of A1 and C1 in cell C3, and make the font of "Text1" bold, but not "Text2". Is there a way to do this in Excel? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenation 2 Texts
You would need VBA.
With ActiveCell .Value = Range("A1").Value & Range("C1").Value .Characters(Len(Range("A1").Value) + 1, _ Len(Range("C1").Value)).Font.Bold = True End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Hi_no_Tori" wrote in message ... Suppose I have two Texts: "Text1" in A1 and "Text2" in C1. I want to make a concatenation of A1 and C1 in cell C3, and make the font of "Text1" bold, but not "Text2". Is there a way to do this in Excel? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenation 2 Texts
Tanks a lot, Bob. It works, but... I need "Text1" to be bold not "Text2" and
I need to seperate between "text1" and "Text2" e.g. by the sign: "-". I'll be very thankful if you can help. "Bob Phillips" wrote: You would need VBA. With ActiveCell .Value = Range("A1").Value & Range("C1").Value .Characters(Len(Range("A1").Value) + 1, _ Len(Range("C1").Value)).Font.Bold = True End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Hi_no_Tori" wrote in message ... Suppose I have two Texts: "Text1" in A1 and "Text2" in C1. I want to make a concatenation of A1 and C1 in cell C3, and make the font of "Text1" bold, but not "Text2". Is there a way to do this in Excel? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenation 2 Texts
No problem
With ActiveCell .Value = Range("A1").Value & "-" & Range("C1").Value .Characters(1, Len(Range("A1").Value) ) _ .Font.Bold = True End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Hi_no_Tori" wrote in message ... Tanks a lot, Bob. It works, but... I need "Text1" to be bold not "Text2" and I need to seperate between "text1" and "Text2" e.g. by the sign: "-". I'll be very thankful if you can help. "Bob Phillips" wrote: You would need VBA. With ActiveCell .Value = Range("A1").Value & Range("C1").Value .Characters(Len(Range("A1").Value) + 1, _ Len(Range("C1").Value)).Font.Bold = True End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Hi_no_Tori" wrote in message ... Suppose I have two Texts: "Text1" in A1 and "Text2" in C1. I want to make a concatenation of A1 and C1 in cell C3, and make the font of "Text1" bold, but not "Text2". Is there a way to do this in Excel? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenation 2 Texts
Once again, thank you very much for your help and your fast response Bob. I
tried it and it works... But I still need some help. I need the concatenation to be in a fixed cell (e.g. D12), instead of the active cell... I tried the following code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Range("D12") .Value = Range("A1").Value & "-" & Range("C1").Value .Characters(1, Len(Range("A1").Value)) _ .Font.Bold = True End With It works at first, but once I click on any cell, all the text in D12 becomes bold. Can you do something to make it work properly... It will be great if you can help. If you can't, it's o.k. and I'm very thankful to you for trying helping me before. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenation 2 Texts
Best to clear it first
Private Sub Worksheet_SelectionChange(ByVal Target As Range) 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 Sub A small problem here is that it fires every time you select a cell, any c ell. It would be better to be targeted at one particular cell. When do you want the setup and formatting to happen? -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Hi_no_Tori" wrote in message ... Once again, thank you very much for your help and your fast response Bob. I tried it and it works... But I still need some help. I need the concatenation to be in a fixed cell (e.g. D12), instead of the active cell... I tried the following code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Range("D12") .Value = Range("A1").Value & "-" & Range("C1").Value .Characters(1, Len(Range("A1").Value)) _ .Font.Bold = True End With It works at first, but once I click on any cell, all the text in D12 becomes bold. Can you do something to make it work properly... It will be great if you can help. If you can't, it's o.k. and I'm very thankful to you for trying helping me before. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formula to apply concatenation to successive rows of data | Excel Worksheet Functions | |||
How to change tick mark labels in z axis from values to texts? | Charts and Charting in Excel | |||
Concatenation | Excel Discussion (Misc queries) | |||
Contatenate different color texts | Excel Discussion (Misc queries) | |||
Concatenation question | Excel Worksheet Functions |