![在公式中使用存储的数字?](https://linux22.com/image/1571827/%E5%9C%A8%E5%85%AC%E5%BC%8F%E4%B8%AD%E4%BD%BF%E7%94%A8%E5%AD%98%E5%82%A8%E7%9A%84%E6%95%B0%E5%AD%97%EF%BC%9F.png)
下面是一段给我带来麻烦的代码:
Dim lastRow As Long
With Worksheets("Rent Roll")
lastRow = Worksheets("Summary").Range("NUM_UNITS").Value
.Range("A1:A" & lastRow + 25).EntireRow.Hidden = False
.Range("A" & lastRow + 26 & ":A526").EntireRow.Hidden = True
.Range("S3").Formula = "=COUNTIF(""J26:J"" & lastRow + 25,""A"")"
具体来说,这是代码的最后一行。更改单元格公式时,不能使用 lastRow 中存储的数字吗?