Hi
I would like to Bold alternate words
for eg Name : MR.EXCEL Country : USA
I tried above only hiliting in bold is Mr. Excel and other remains without bold
MR.EXCEL and USA should be in bold
Thanks
NimishK
I would like to Bold alternate words
for eg Name : MR.EXCEL Country : USA
Code:
Dim strName As String, strCountry As String, Dim mpStart As Long
strName = "MR.EXCEL"
strCountry = "USA"
With Worksheets("sheet5").Cells(14, 1)
.Font.Bold = False
.value = "Name : " & strName
.value = "Country : " & strCountry '
mpStart = InStr(.value, strName)
If mpStart > 0 Then
.Characters(mpStart, Len(strName)).Font.Bold = True
.Characters(mpStart, Len(strCountry)).Font.Bold = True
End If
End With
MR.EXCEL and USA should be in bold
Thanks
NimishK
Last edited: