[英]Cells(1) - what does it mean
I recieved an answer in the code below from a very helpful stackoverflow user: Solving variable variable's names issue in excel 我在下面的代码中收到一个非常有用的stackoverflow用户的答案: 解决excel中变量变量的名称问题
But I am not sure why he uses Cells(1) in the code. 但是我不确定他为什么在代码中使用Cells(1)。 Does this correspond to: Cells(1) = whole worksheet?
这是否对应于:Cells(1)=整个工作表?
Thx for help 寻求帮助
You could just write a simple Macro to see what it does. 您可以编写一个简单的宏以查看其功能。 Something like this:
像这样:
Sub test()
Dim c As Integer
For c = 1 To 5
Debug.Print Cells(c).Address
Next
End Sub
You would then see, that Cells(1) refers to A1, Cells(2) to B1 and so on. 然后,您会看到Cells(1)引用A1,Cells(2)引用B1,依此类推。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.