ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Assign Bold Feature to one of the Word in a Cell (https://www.excelbanter.com/excel-programming/394385-assign-bold-feature-one-word-cell.html)

Akash

Assign Bold Feature to one of the Word in a Cell
 
Hi,

I had a querry,

Suppose I have values like in Cell A1: A100,. e.g.
ION-MastersHobby Accadmic Qulaification
ION-MastersEmployee 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


Chip Pearson

Assign Bold Feature to one of the Word in a Cell
 
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)


"Akash" wrote in message
ups.com...
Hi,

I had a querry,

Suppose I have values like in Cell A1: A100,. e.g.
ION-MastersHobby Accadmic Qulaification
ION-MastersEmployee 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




All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com