I want to set bold some text in string.How can i do it ?
By using Characters.
Range("A1").Characters(8, 5).Font.Bold = True
I would say use this dynamic formula –
Range("A1").Characters(worksheetfunction.find("Excel",Range("A1").value,1),len("Excel")).font.bold = True
Another way for people who need a quick fix and aren’t comfortable using VBA:
- Copy and paste the cell range into a word document (it will look messy at first).
- Go to “replace” (top right).
- Type the word you want to make bold into the “Find what:” field and the same into the “Replace with:” field, then when you are on the “Replace With:” box press CTRL B. You should see “Format: Font: Bold” appear beneath it.
- Click Replace All and you should see all the targeted words go bold.
- Hover over your Excel text (currently in Word) and you should see a small symbol of 4 arrows appear at the top left of the text. Click that to highlight the cells, then you can copy them and paste back into excel.
Not the fastest way but if you’re not familiar with VBA and need a quick fix this will work for you!
Not just for Bold:
CTRL I for italics, CTRL U for underlined.