繁体   English   中英

如何在 Excel 中加粗包含 ** 的单元格并删除所有 *

[英]How to bold cells containing ** and remove all * in Excel

如何在 Excel 中加粗包含**(并删除所有 *)的单元格?

这里是 go。 它遍历活动工作表中的所有单元格:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM