Mega Code Archive

 
Categories / VisualBasic Script / Forms
 

Searching for and Replacing Formatting

Sub font()     With Application.FindFormat.Font         .Name = "Arial"         .Size = "12"         .Bold = True     End With     With Application.ReplaceFormat.Font         .Name = "Arial Black"         .Bold = False     End With     Cells.Replace What:="5", Replacement:="5", LookAt:=xlPart, SearchOrder _         :=xlByColumns, MatchCase:=False, SearchFormat:=True, ReplaceFormat:=True End Sub