Excel 当移动到另一台计算机时,包含COUNTIFS的宏返回0

Excel 当移动到另一台计算机时,包含COUNTIFS的宏返回0,excel,vba,Excel,Vba,下面是一个示例代码,当复制到另一台拥有相同版本excel的计算机时,我得到零 i = Application.WorksheetFunction.CountIfs(.Range(.Cells(2, resolve_date), .Cells(lastrow, resolve_date)), ">=" & date1, _ .Range(.Cells(2, resolve_date), .Cells(lastrow, resolve_date)), "<=" &am

下面是一个示例代码,当复制到另一台拥有相同版本excel的计算机时,我得到零

i = Application.WorksheetFunction.CountIfs(.Range(.Cells(2, resolve_date), .Cells(lastrow, resolve_date)), ">=" & date1, _
      .Range(.Cells(2, resolve_date), .Cells(lastrow, resolve_date)), "<=" & date2, .Range(.Cells(2, Planned_release), .Cells(lastrow, Planned_release)), rel)
i=Application.WorksheetFunction.CountIfs(.Range(.Cells(2,resolve_日期),.Cells(lastrow,resolve_日期)),“>=”&date1_

.Range(.Cells(2,resolve_date),.Cells(lastrow,resolve_date)),“另一台计算机的系统日期与第一台计算机的系统日期相同吗?在两台计算机上的代码行中设置一个断点,然后检查语句中每个参数的内容。您希望能在参数中找到差异,帮助您解决问题。。。