請問一下 Excel VBA Vlookup 比對範圍 使用變數
只有1用數值路徑可以搜尋的出來
其他用變數 , 或是 CHR(64+ S1 or S2) 都找不出來
可以請大家幫忙找一下問題嗎??
S1=C
S2=D
1.
Sheets("Sheet1").Range("D6") = Application.VLookup(Sheets("Sheet3").Range("A6"), Sheets("Sheet3").Columns("C:D"), 2, False)
2.
'Sheets("Sheet1").Range("D6") = Application.VLookup((Sheets("Sheet3").Range("A6"), Sheets("Sheet3").Columns(S1& ":" & S2), 2, False)
3.
'Sheets("Sheet1").Range("D6") = Application.VLookup((Sheets("Sheet3").Range("A6"), Sheets("Sheet3").Columns(Chr(64 + S1) & ":" & Chr(64 + S2)), 2, False)
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.