bradh_nz
08-24-2007, 05:44 AM
Hello, I have the below code to run a loop howver I am having problmes getting it to start in the desired range )Range("G6:W10").Select) as it starts running in cell A1
Sub LoopFormula()
ScreenUpdating = False
Range("G6:W10").Select
cc = Selection.Columns.Count
rc = Selection.Rows.Count
For i = 1 To cc
For j = 1 To rc
Cells(j, i).Value = "=VLOOKUP(R5C,INDIRECT.EXT(""'""&RC5),3,FALSE)"
Cells(j, i).Copy
Cells(j, i).PasteSpecial Paste:=xlPasteValues
Next j
Next
ScreenUpdating = False
End Sub
Any help appreciated
Sub LoopFormula()
ScreenUpdating = False
Range("G6:W10").Select
cc = Selection.Columns.Count
rc = Selection.Rows.Count
For i = 1 To cc
For j = 1 To rc
Cells(j, i).Value = "=VLOOKUP(R5C,INDIRECT.EXT(""'""&RC5),3,FALSE)"
Cells(j, i).Copy
Cells(j, i).PasteSpecial Paste:=xlPasteValues
Next j
Next
ScreenUpdating = False
End Sub
Any help appreciated