spencerp237
New Member
- Joined
- Feb 24, 2017
- Messages
- 26
Code:
Set Sourcewb = ActiveWorkbook
Set Destwb = Workbooks.Add
With Destwb.Sheets("Pay")
.Range("B:B").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
.Range("B3").FormulaR1C1 = "=VLOOKUP(RC[-1],Sourcewb.Sheets(""Strategy"").Range(C5:C52),48,FALSE)"
.AutoFill Destination:=Range("B2:B" & payLR)
End With
I am trying to reference my Sourcewb in VLOOKUP in an R1C1 formula. I know the code above is wrong, but it's just there to highlight what I'm trying to do. The "Sourcewb.Sheets(""Strategy"").Range(C5:C52)" part is what I am not sure how to do. Thanks for any help!
Edit:
Just clarifying that I want that part to reference Column E:AZ on the Strategy worksheet
Last edited: