求VBA代码,定义行列
发布网友
发布时间:2022-09-22 03:09
我来回答
共2个回答
热心网友
时间:2023-11-23 23:46
Dim I, J
For I = 1 To 5
For J = 1 To 3
If InStr(1, Cells(5 + (I - 1) * 12, 1 + (J - 1) * 4).Value, "固") > 0 Then
Cells(9 + (I - 1) * 12, 1 + (J - 1) * 4).Select
With Selection.Font
.ThemeColor = xlThemeColorLight1
End With
End If
Next J
Next I
热心网友
时间:2023-11-23 23:47
'A 第1列,E 第5列,I 第9列
for each cel in range("A5:I57")
rw=cel.row
col =cel.column
if (rw-5) mod 12 =0 then
if col=1 or col=5 or col=9 then
if InStr(1, Range("A5").Value, "固") > 0 then
cel.offset(4,0).Select
With Selection.Font
.ThemeColor = xlThemeColorLight1
End With
end if
end if
end if
next