Hello everyone,
I am having an issue with optimization and I was wondering if anyone had any suggestions they could throw out to speed my code up. I need to run a Vlookup against 4 massively large spreadsheets. I am using Ozgrid's UDF found here:
Vlookup. Excel Vlookup Across Excel Worksheets. Custom VLookup Formula/Function
I am using this as part of a larger VBA script that vlookups up certain numbers. The thing to be found will only appear once on one of the four worksheets and the worksheets are in alphabetically order. Each worksheet that I am vlooking up against has 65k or so rows.
Can anyone think of a way to optimize this so that it doesn't take so long for the VBA script to run?
Here is the snippet of code where this is used:
I am having an issue with optimization and I was wondering if anyone had any suggestions they could throw out to speed my code up. I need to run a Vlookup against 4 massively large spreadsheets. I am using Ozgrid's UDF found here:
Vlookup. Excel Vlookup Across Excel Worksheets. Custom VLookup Formula/Function
I am using this as part of a larger VBA script that vlookups up certain numbers. The thing to be found will only appear once on one of the four worksheets and the worksheets are in alphabetically order. Each worksheet that I am vlooking up against has 65k or so rows.
Can anyone think of a way to optimize this so that it doesn't take so long for the VBA script to run?
Here is the snippet of code where this is used:
Code:
Do
ActiveCell.FormulaR1C1 = _
"=PERSONAL.XLSB!VLOOKAllSheets(CONCATENATE(Sheet2!R[" & row & "]C[-2],MID(RC[4],LEN(RC[4])-1,1),RIGHT(RC[2],1)),C[-1]:C[0],2,FALSE)"
row = row - 1
ActiveCell.Offset(1, 0).Select
If Right(ActiveCell.Offset(0, 2), 1) = 1 Then
row = row + 1
End If
Loop Until IsEmpty(ActiveCell.Offset(0, 1))