Excel计算单元格背景颜色个数VBA代码:
Sub 按钮1_Click() Dim a As IntegerDim i As Longa = 0For i = 1 To 9999If Range("B" & i).Interior.ColorIndex xlNone Thena = a + 1End IfNext iRange("D9").Value = a
End Sub
点击加入群:Excel部落结识Excel大神学好Excel,效率成倍提高,薪水稳步增长,职位快速提升
每天一个源创技巧,如觉得有用,请点上面关注。更重要手机转发分享