Sub CheckNum() iCount = 0 iRow = ActiveSheet.Range("s65535").End(xlUp).Row ‘取最后一行 iCol = ActiveSheet.Range("dz2").End(xlToLeft).Column ‘取最后一列 MsgBox "iRow为: " & iRow MsgBox "iCol为: " & iCol For m = 0 To iRow For j = 0 To iCol ‘列循环 If ActiveSheet.Cells(m, j) = "●" Then ActiveSheet.Cells(m, j) = Range("S" & m) iCount = iCount + 1 End If Next Next MsgBox "处理数值为: " & iCount End Sub
时间: 2024-12-09 01:08:31