D
Dennis
Using XL 2003 & 97
Attempting, with VBA, to autofill a column range with a vlookup formula.
The vlookup formula that works fine (if I manually select the range) is:
Range("B4").FormulaR1C1 = "=VLOOKUP(RC[-1],R4C6:R274C7,1,FALSE)"
The challenge is that the table range of R4C6:R274C7 was the result of
manual selection.
I attempted to use VBA to automatically determine the range:
Dim myRange As Range
Set myRange = Range("F3:G" & Range("F" & Rows.Count).End(xlUp).Row)
What is the syntax to use myRange in the following VBA code? (Or where am I
off base?)
Range("B4").FormulaR1C1 = "=VLOOKUP(RC[-1], ???????? ,1,FALSE)"
Once I know how to incorporate myRange, then I will use the following to
filldown:
Range("B4").AutoFill Destination:=Range("B4:B" & Range("A" &
Rows.Count).End(xlUp).Row), Type:=xlFillCopy
TIA
Dennis
Attempting, with VBA, to autofill a column range with a vlookup formula.
The vlookup formula that works fine (if I manually select the range) is:
Range("B4").FormulaR1C1 = "=VLOOKUP(RC[-1],R4C6:R274C7,1,FALSE)"
The challenge is that the table range of R4C6:R274C7 was the result of
manual selection.
I attempted to use VBA to automatically determine the range:
Dim myRange As Range
Set myRange = Range("F3:G" & Range("F" & Rows.Count).End(xlUp).Row)
What is the syntax to use myRange in the following VBA code? (Or where am I
off base?)
Range("B4").FormulaR1C1 = "=VLOOKUP(RC[-1], ???????? ,1,FALSE)"
Once I know how to incorporate myRange, then I will use the following to
filldown:
Range("B4").AutoFill Destination:=Range("B4:B" & Range("A" &
Rows.Count).End(xlUp).Row), Type:=xlFillCopy
TIA
Dennis