concatenate with formatting

Jack T

New Member
Joined
Feb 13, 2019
Messages
7
Hi

I need help on this.

I have two column A & B

A1 B1 C1 (concatenate result)-Bold and Italic
Happy Family Happy Family

May I know what should I do?
Thank you
Jack T
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi & welcome to MrExcel
That can only be done if col C is text (rather than a formula) and it needs to be VBA.
Is that Ok?
 
Upvote 0
How about
Code:
Sub Jack_T()
   Dim Cl As Range
   
   For Each Cl In Range("C1", Range("A" & Rows.Count).End(xlUp).Offset(, 2))
      With Cl
         .Value = Cl.Offset(, -2) & " " & Cl.Offset(, -1)
         With .Characters(Len(Cl.Offset(, -2)) + 1, Len(.Value)).Font
            .Bold = True
            .Italic = True
         End With
      End With
   Next Cl
End Sub
 
Upvote 0
Dear Fluff

I have new request as below
column A & B & C
A2= We
B2= Are
C2 = Happy


Result in D2 = (concatenate result) A2 (maintain format), B2 (second row, Bold and Italic) C2 (Third Row, Bold and Italic)
eg;
We
Are
Happy
(All text wrap text in D2 Cell
May I know what should I do?

Thank you.
Jack T
 
Upvote 0
How about
Code:
Sub Jack_T()
   Dim Cl As Range
   
   For Each Cl In Range("D2", Range("A" & Rows.Count).End(xlUp).Offset(, 3))
      With Cl
         .Value = Cl.Offset(, -3) & Chr(10) & Cl.Offset(, -2) & Chr(10) & Cl.Offset(, -1)
         With .Characters(Len(.Offset(, -3)) + 1, Len(.Value)).Font
            .Bold = True
            .Italic = True
         End With
      End With
   Next Cl
End Sub
 
Upvote 0
How about
Code:
Sub Jack_T()
   Dim Cl As Range
   
   For Each Cl In Range("D2", Range("A" & Rows.Count).End(xlUp).Offset(, 3))
      With Cl
         .Value = Cl.Offset(, -3) & Chr(10) & Cl.Offset(, -2) & Chr(10) & Cl.Offset(, -1)
         With .Characters(Len(.Offset(, -3)) + 1, Len(.Value)).Font
            .Bold = True
            .Italic = True
         End With
      End With
   Next Cl
End Sub

the code work beautifully. Gracia
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top