Assign Bold Feature to one of the Word in a Cell

  • Thread starter Thread starter Akash
  • Start date Start date
A

Akash

Hi,

I had a querry,

Suppose I have values like in Cell A1: A100,. e.g.
ION-Masters>Hobby Accadmic Qulaification
ION-Masters>Employee Category

Now what i want to Bold the word "Masters" in all the Cell of
(A1:A100)

What should i do in this regard

Thanks

Akash Maheshwari
 
Try something like the following:

Sub AAA()
Dim Rng As Range
Dim Pos As Integer
Application.ScreenUpdating = False
For Each Rng In Range("A1:A100")
' Case sensitive match. use vbTextCompare instead
' of vbBinaryCompare to ignore upper/lower case
Pos = InStr(1, Rng.Text, "Master", vbBinaryCompare)
If Pos > 0 Then
Rng.Characters(Pos, 6).Font.Bold = True
End If
Next Rng
Application.ScreenUpdating = True
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top