我在VBA中使用索引匹配,想将值复制到该地址。
Sub IndexMatch()
rng = Application.WorksheetFunction.Index(Sheet2.Range("E:E"),_
Application.WorksheetFunction.Match(Sheet1.Range("B1").Value,Sheet2.Range("B:B"),0)).Address(False,False)
MsgBox rng
Sheet1.Range("B1").copy Sheet2.Range("rng")
End Sub