How to bold cells containing ** (, and remove all *) in Excel?
Here you go. It goes throu all the cells in the active sheet:
Sub checkStars()
Dim Cell As Range
For Each Cell In ActiveSheet.Range("A1:" & Range("A1").SpecialCells(xlCellTypeLastCell).Address)
If InStr(Cell.Value2, "**") > 0 Then
Cell.Font.Bold = True
Cell.Value2 = Replace(Cell.Value2, "**", "")
End If
Next Cell
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.