anthony20069
02-18-2013, 07:40 AM
Hey guys,
Been trying to play around with the .FormulaR1C1 in VBA but with no luck
i have the following
'Vlookup
Set rMy_Range = .Range("F6:F" & iLast_row)
' rMy_Range.Select
rMy_Range.FormulaR1C1 = "=VLOOKUP(R[0]C[-1],'Search Criteria'!C2:D89,2,FALSE)"
But it brings populate the cells with the following:
=VLOOKUP(E6,'Search Criteria'!$B:$B:'D89',2,FALSE)
As you can see the tablelookup i.e. ",'Search Criteria'!C2:D89" is set but this seems to be ignored...
Any help?
Been trying to play around with the .FormulaR1C1 in VBA but with no luck
i have the following
'Vlookup
Set rMy_Range = .Range("F6:F" & iLast_row)
' rMy_Range.Select
rMy_Range.FormulaR1C1 = "=VLOOKUP(R[0]C[-1],'Search Criteria'!C2:D89,2,FALSE)"
But it brings populate the cells with the following:
=VLOOKUP(E6,'Search Criteria'!$B:$B:'D89',2,FALSE)
As you can see the tablelookup i.e. ",'Search Criteria'!C2:D89" is set but this seems to be ignored...
Any help?