![](/img/trans.png)
[英]Excel VBA to pull a cell address from one cell, pull a value from another, and input into yet another cell
[英]Excel VBA - Use value in cell as address to target another cell
這是我的第一篇文章!
我有N11顯示我要放置字符串變量x的單元格位置,因此當N11讀取G2時,我需要將x輸入到G2中。
到目前為止我沒有成功:
y = Worksheets("Sheet2").Cells(11, "N").Value
Range(y) = x
提前致謝!
嘗試以下子。
Sub PutValue()
Dim x As Date
x = #3/10/2017#
Range(Range("N11").Value).Value = x
End Sub
---------------------------編輯----------------------
Sub PutValue()
Range(Sheet2.Range("N11").Value).Value = "x"
End Sub
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.