我正在尝试使用.Countifs语句。我想指望我的代码中的变量定义的列的值。我想这样做:
LastRow = 'defined as last row in file
Dim fcur As Range
Set fcur = Sheet.Cells.Find("sport")
With Application.WorksheetFunction
baseballs = .CountIfs(Sheet.Range(Cells(1,fcur.Column), (LastRow,fcur.Column)), "=baseball")
End With
我不断收到错误代码,告诉我“对象工作表的方法范围失败了”。我很难过。