Vlookup is slow, loops are too slow

bat18

Board Regular
Joined
Mar 29, 2010
Messages
89
I am trying to record a macro which does a Vlookup on between 12,000 and 18,000 cells over another worksheet containing about 900 entries. At the moment the process is terribly slow, i simply typed in the formula and copied it down to cell 18000. This was very time consuming so I then decided to do a Do and then Loop Until but that was much much slower.

Is there a quicker way around all this??
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Are you putting it in as a formula? Maybe switch to manual calculation at the start of the code, and then back to automatic at the end:

Code:
Application.Calculation = xlManual
'
'rest of code
'
Application.Calculation = xlAutomatic

It may be useful to see the code that you have tested this with.
 
Upvote 0
Cheers

What does the code you've written actually mean?

The vlookup I'm using is below

=vlookup(c2, 'file name', 2, false)
 
Upvote 0
What does the code you've written actually mean?

It's like going to Excel Options and choosing manual calculation from the Calculation tab. If you are looping then it avoids lengthy recalc between interations.
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top