如何用变量替换RC公式值

时间:2016-11-02 11:28:44

标签: vba

我有以下查找

ActiveCell.FormulaR1C1 = _
       "=IFERROR(VLOOKUP(RC[-4], 'C:\Users\me\Downloads\Ca%2f_client_vlookup\[" & myFileNameCA & "]" & mySheetNameCA & "'!R10C1:R112C7,1,FALSE),"""")"

我怎样才能将返回的值存储到变量中?

1 个答案:

答案 0 :(得分:0)

dim variable

variable = WorksheetFunction.VLOOKUP(RC[-4], 'C:\Users\me\Downloads\Ca%2f_client_vlookup\[" & myFileNameCA & "]" & mySheetNameCA & "'!R10C1:R112C7,1,FALSE)