'Is there a way to change the lookup_value of the Macro code with the identified cell address?
I need to change the lookup_value of RC[-2]
with the address Cells(3,2)
on the macro code below.
Range("D4").FormulaR1C1 = "=VLOOKUP(RC[-2],'[Reference Workbook.xlsx]Sheet1'!R2C3:R12C3,1,0)"
Range("D4:D10").FillDown
I am trying to apply the formula of vlookup on multiple sheets but it is not always on RC[-2]
as it varies from sheet to sheet. I have already identified what lookup_value cell on each sheet, but it is on this format Cells(3,2)
I have used .Find
to identify what cell to use. I'm also going to apply the selection.filldown
for the rest of the entries on each sheet.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|