jislandhopper
Board Regular
- Joined
- Jul 23, 2013
- Messages
- 92
Hi,
I made a V-lookup fuction against a cell where is searched different paramenters depending on the calls value. But when I record the marco it doesnt work. The code doesnt fill in or copy down. Can anyone tell me whats wrong?
The cell I want to populate and down is G2:G2000 and the code I have is below. The code works if I type it manually but not if I create a macro and I can't figure out why, can anyone help?
Sheets("UCR Index").Select
Range("G2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(RC[-4]>R[-1]C[696],VLOOKUP(RC[-4],'UCR LIST'!R2C[-5]:R2001C[9],15,FALSE),VLOOKUP('UCR Index'!RC[-5],'UCR LIST'!R2C[-6]:R2001C[9],16,FALSE)),"""")"
Range("G2").Select
Selection.FillDown
I made a V-lookup fuction against a cell where is searched different paramenters depending on the calls value. But when I record the marco it doesnt work. The code doesnt fill in or copy down. Can anyone tell me whats wrong?
The cell I want to populate and down is G2:G2000 and the code I have is below. The code works if I type it manually but not if I create a macro and I can't figure out why, can anyone help?
Sheets("UCR Index").Select
Range("G2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(RC[-4]>R[-1]C[696],VLOOKUP(RC[-4],'UCR LIST'!R2C[-5]:R2001C[9],15,FALSE),VLOOKUP('UCR Index'!RC[-5],'UCR LIST'!R2C[-6]:R2001C[9],16,FALSE)),"""")"
Range("G2").Select
Selection.FillDown