I'm using VBA in excel 2010. I figured out that i could use vlookup to access workbooks without opening them up this is the code i've got.
This works great but the issue i'm having is that if someone has the workbook that i'm referencing open making it read only, the vlookup function drastically slows down. If i have 100+ entries in my array this can take quite a while to finish.
Is there anything i can do to fix this or some other option available that i can try.
Code:
For i = 0 to Ubound(myData,1) -1
[A2].Offset(i, 2) = myData(i + 1, p + 1) 'partnumber
[A2].Offset(i, 3) = "=VLOOKUP(" & CStr([A2].Offset(i, 2).Value) & _
",'" & myPath & "Sheet1'!$A$2:$C$10000,3,FALSE)"
[A2].Offset(i, 3) = [A2].Offset(i, 3).Value 'convert formula to a value
next
Is there anything i can do to fix this or some other option available that i can try.
Comment