我想在单元格范围内运行排名公式。我在挠挠我的头,为什么它不工作。拉斯特罗只是计算行数的公式。在VBA中将公式作为语法写入
Range("B1:B" & Lastrow).Formula = "=RANK(A1,Offset(" & Chr$(36) & "A1" & Chr$(36) & "," & Lastrow & ",0))"
我觉得这是与CHR $(36)做错事,但是当我尝试CHR(36),它也不起作用。 (删除这些chr(36)的和只有偏移量(A1 ...等)工作正常)。
在此先感谢!
被愚蠢!'Range(“B1:B”&Lastrow).Formula =“ = RANK(A1,A1:偏移量(“&Chr(36)&”A“&Chr(36)&”1“)&Lastrow &“,0))”' – mrhappysmile
所以你得到它的工作? – ashleedawg
为什么你使用Chr(36)而不是只给$加入字符串? – ashleedawg