Concatenate and bold - Excel 2007

preqin

Board Regular
Joined
Mar 15, 2005
Messages
83
I have a simple concatenate in Excel...

=CONCATENATE(A1, ", ", A2)

Which produces:

This is, my text

Now, I want 'my text' i.e. the contents of A2 to be in bold.

I've played with the TEXT() function before, as per this page:
http://www.techonthenet.com/excel/formulas/text.php

To get Excel to play nicely with date formats and stuff, however, my research has come to a dead end with Bold/Italic - with everyone suggesting that VBA is the only solution.

As I don't feel overly comfortable using VBA is there any other solution? (If not, is this a VBA 101 task or an advanced task?)
 
Hi everyone!

Your code helped me a lot YARD, but i need to make some adjustments to it.I hope i can count with you.

Code:
Sub BoldPartTextmarcelo()
Dim Part1Len, Part2Len, DividerLen As Integer
Dim Divider As String
Part1Len = Len(Range("D58")) + 21
Part2Len = Len(Range("D59"))
Part3Len = Len(Range("D60"))
Part4Len = Len(Range("D61"))
Part5Len = Len(Range("D62"))
Part6Len = Len(Range("D63"))
Part7Len = Len(Range("D64"))
Part8Len = Len(Range("D65"))
Part9len = Len(Range("D66"))
Part10len = Len(Range("D67"))
Part11len = Len(Range("D68"))
Part12Len = Len(Range("D69"))
Part12Len = Len(Range("D70"))
 
paragrafo = "                    "
Divider = " "
Dividercomma = ", "
Dividerparent1 = "("
dividerparent2 = ")"
DividerLen = Len(Divider)
pontofinal = "."
 
Range("B19") = paragrafo & Range("D58") & Divider & Range("D59") & Divider & Range("D60") & Divider & Range("D61") & Dividercomma & Divider & Range("D62") & Divider & Range("D63") & Divider & Dividerparent1 & Range("D64") & dividerparent2 & Divider & Range("D65") & Divider & Range("D66") & Divider & Range("D67") & Divider & Range("D68") & Divider & Range("D69") & Divider & Range("D70") & pontofinal
With Range("B19").Characters(Start:=Part1Len + DividerLen, Length:=Part2Len).Font
        .FontStyle = "Bold"
       
End With
End Sub

What i need to change is that i need to have part9len, part10len and part11len as bold too. But I don’t know how to add that to the code.


Congrats on the great job you guys are doing here on mrexcel.
Thanks in advance.
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi everyone!

Your code helped me a lot YARD, but i need to make some adjustments to it.I hope i can count with you.

Code:
Sub BoldPartTextmarcelo()
Dim Part1Len, Part2Len, DividerLen As Integer
Dim Divider As String
Part1Len = Len(Range("D58")) + 21
Part2Len = Len(Range("D59"))
Part3Len = Len(Range("D60"))
Part4Len = Len(Range("D61"))
Part5Len = Len(Range("D62"))
Part6Len = Len(Range("D63"))
Part7Len = Len(Range("D64"))
Part8Len = Len(Range("D65"))
Part9len = Len(Range("D66"))
Part10len = Len(Range("D67"))
Part11len = Len(Range("D68"))
Part12Len = Len(Range("D69"))
Part12Len = Len(Range("D70"))
 
paragrafo = "                    "
Divider = " "
Dividercomma = ", "
Dividerparent1 = "("
dividerparent2 = ")"
DividerLen = Len(Divider)
pontofinal = "."
 
Range("B19") = paragrafo & Range("D58") & Divider & Range("D59") & Divider & Range("D60") & Divider & Range("D61") & Dividercomma & Divider & Range("D62") & Divider & Range("D63") & Divider & Dividerparent1 & Range("D64") & dividerparent2 & Divider & Range("D65") & Divider & Range("D66") & Divider & Range("D67") & Divider & Range("D68") & Divider & Range("D69") & Divider & Range("D70") & pontofinal
With Range("B19").Characters(Start:=Part1Len + DividerLen, Length:=Part2Len).Font
        .FontStyle = "Bold"
       
End With
End Sub

What i need to change is that i need to have part9len, part10len and part11len as bold too. But I don’t know how to add that to the code.


Congrats on the great job you guys are doing here on mrexcel.
Thanks in advance.

I forgot to say that im using excel 2013. Ty
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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