[英]Excel Macro to change font in cell
I need a macro that will in my spreadsheet search for:我需要一个可以在我的电子表格中搜索的宏:
You should first answer these types of questions by using record macro.您应该首先使用记录宏来回答这些类型的问题。
Dim LastRow As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
For I = 0 to LastRow
If Cells(I, 2).Value = "H2" OR If Cells(I, 2).Value = "H3" Then
Cells(I, 2).Font.Bold = True 'Probably doesnt work search the syntax
End If
Next I
There are mistake i think but the structure is something like this我认为有错误,但结构是这样的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.