求助vba中countif方法的列变量引用

2025-01-04 04:33:42
推荐回答(1个)
回答1:

方法一:
Cells(i, 4) = "=countif(range(cells(2," & j + 2 & ") : cells(268," & j + 2 & "),cells( " & i & ",3))"
方法二:
Cells(i, 4) = Application.WorksheetFunction.CountIf(Range(Cells(2, j + 2), Cells(268, j + 2)), Cells(i, 3))