millhouse123
Active Member
- Joined
- Aug 22, 2006
- Messages
- 335
Below is a small section of code I have been working on.
In Its current state it works fine however I need to make the Column references dynamic. So in this case I need to assign "Q" to a variable.
Q currently Represents the last column in my spreadsheet. I assign it to a variable FinalColumn2 --- FinalColumn2 = WS2.Cells(3, 230).End(xlToLeft).Column --- Which works great. I just can't figure out how to us the FinalColumn2 variable instead of the Q.
Any help would be great.
Range("Q4:Q" & FinalRow2).Formula = "=VLOOKUP(A4," & WS1.Name & "!" & PRange1.Address & ",3,)"
[/code]
In Its current state it works fine however I need to make the Column references dynamic. So in this case I need to assign "Q" to a variable.
Q currently Represents the last column in my spreadsheet. I assign it to a variable FinalColumn2 --- FinalColumn2 = WS2.Cells(3, 230).End(xlToLeft).Column --- Which works great. I just can't figure out how to us the FinalColumn2 variable instead of the Q.
Any help would be great.
Range("Q4:Q" & FinalRow2).Formula = "=VLOOKUP(A4," & WS1.Name & "!" & PRange1.Address & ",3,)"
[/code]