Hi
I want to find all bold cells in column M and append a semicolon ( ; ) at end of such cells.
I have written the following sub for that.
While this does what I want, is this the most efficient way, or is there a better way?
(I am assuming that I have to do it only for rows 3-9)
tia
Ajay
Private Sub CommandButton1_Click()
Dim rg_format As Range
Application.FindFormat.Clear
Application.FindFormat.Font.Bold = True
Set rg_format = Range("M3:M9").Find(What:="", LookAt:=xlPart, SearchDirection:=xlNext, SearchFormat:=True)
If Not rg_format Is Nothing Then
Do
Range("M" & rg_format.Row) = Range("M" & rg_format.Row) & ";"
Set rg_format = Range("M" & rg_format.Row + 1 & ":M9").Find(What:="", LookAt:=xlPart, SearchDirection:=xlNext, SearchFormat:=True)
Loop While Not rg_format Is Nothing
End If
Application.FindFormat.Clear
End Sub
Bookmarks