REPLACE PART OF CELL WITH FORMATTED TEXT
This may come close.
Sub Bold_String()
Dim rng As Range
Dim cell As Range
Dim start_str As Integer
Set rng = Selection
For Each cell In rng
start_str = InStr(cell.Value, "SM")
If start_str Then
With cell.Characters(start_str, 2).Font
.FontStyle = "Bold Italic"
.ColorIndex = 6
End With
End If
Next
End Sub
Gord Dibben MS Excel MVP
On 27 Dec 2006 12:41:50 -0800, "Manju" wrote:
Harlan Grove wrote:
Manju wrote...
...
I WANT IT TO APPEAR LIKE TRR/SM/HK WITH SM IN BOLD AND ITALICS WITH
YELLOW HIGHLIGHTING
...
Don't use all caps. It's considered shouting.
You'd need to select the SM in the cell contents, press [Ctrl]+1, then
use the formatting dialog.
Sorry for using all caps.
I meant to change a vast range of cells which has other persons
initials also along with mine (SM) in a single cell to know all the
places where my name is appearing.
If i need to select each cell individually and change the formatting it
doesn't serve my purpose. I hope you have a solution.
How do I attach a excel file if I want to show you the actual
spreadsheet with problem ?
Regards.
Manju
|