引用:
vlookupの検索値をR1C1で表記したいのですが、下記のエラーが解消されません。
引用:
Rng = Range(Cells(3, 1), Cells(6, 2)).Address
Range(Cells(3, 7), Cells(3, 8)).FormulaR1C1Local = "=vlookup(R[-1]c, " & Rng & ",2,0)"
Rng = Range(Cells(3, 1), Cells(6, 2)).Address
(ReferenceStyle:=xlR1C1)
Range(Cells(3, 7), Cells(3, 8)).FormulaR1C1Local = "=vlookup(R[-1]c, " & Rng & ",2,0)"
------------------------------------------------------------
Excel.Range オブジェクトの Address プロパティの
第 3 引数 ReferenceStyle を省略した際の既定値は
定数 xlA1(値 1 )です。
つまり R1C1 形式の数式に A1 形式のアドレスが含まれているために
発生している実行時エラー。