jumbel
09-11-2008, 08:08 AM
I am using vlookup to look for values from another workbook. I need to display those values in the same workbook as that of my macro. It works well when the First.xls file is open, but it takes a lot of time for executing just 6 lines of code. The code can be seen below.
Can anybody help me with this??
Sub Lookup()
Range("GF4:GF2000").Select
Selection.FormulaR1C1 = "=RC7&RC8&RC9"
Range("GG4:GG2000").Select
Selection.FormulaR1C1 = "=SUBSTITUTE(RC[-1],0,"""",1)"
Range( "J4:J1090). Select
Selection.FormulaR1C1 = _
"=VLOOKUP(R4C189:R1091C189,[First.xls]Sheet1!R3C11:R804C233,223,FALSE)"
End Sub
Can anybody help me with this??
Sub Lookup()
Range("GF4:GF2000").Select
Selection.FormulaR1C1 = "=RC7&RC8&RC9"
Range("GG4:GG2000").Select
Selection.FormulaR1C1 = "=SUBSTITUTE(RC[-1],0,"""",1)"
Range( "J4:J1090). Select
Selection.FormulaR1C1 = _
"=VLOOKUP(R4C189:R1091C189,[First.xls]Sheet1!R3C11:R804C233,223,FALSE)"
End Sub