![](/img/trans.png)
[英]Search for a value in a column and use the row number obtained to copy a cell
[英]Use a cell value as Row and Column number
我正在使用以下代碼嘗試選擇MyRow
和MyCol
相交處的MyRow
MyCol
。 當前值為MyRow
:6和MyCol
:4,應選擇D6
。
我無法獲得最后一行失敗的正確語法:
Sub SelectCS()
Dim MyRow As Integer
Dim MyCol As Integer
MyRow = Sheet1.Range("a4").Value
MyCol = Sheet1.Range("a5").Value
Range((MyRow), (MyCol)).Select
End Sub
Public Sub SelectCS()
Dim MyRow As Integer
Dim MyCol As Integer
MyRow = Range("A1").Value
MyCol = Range("B1").Value
Cells(MyRow, MyCol).Select
End Sub
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.