Vlookup very slow

leeksleeks

Board Regular
Joined
Oct 31, 2013
Messages
96
Hi,

I have a large excel file of golf results (150,000 rows) and I have a vlookup formula that will look though the results and tell me what position the golfer came in previous years when playing on that course. However the vlookup formula I use takes forever to calculate and seem to be calculating any chance it gets (calculating 4 processors). I have read on other posts that people with many more rows of information have found very quick ways of calculating their results, so I was wondering if anyone can help me out.

I have two main worksheets. 1 called Results and 1 called Summary.


On the worksheet called RESULTS I enter the results from each tournament. Below is how this looks starting from Cell A1. The concatenation I use is for the lookup on the next worksheet called SUMMARY. Below is the information I add to the RESULTS worksheet:

=CONCATENATE(C2&J2&K2)POSPLAYERTO PARR1R2R3R4TOTCOURSEYEARTOURNAMENTTOUR
GolferAPebbleBeach20131Golfer A-1269696969276Pebble Beach2013US OpenPGA

<tbody>
</tbody>

The below table is what the Summary worksheet looks like. I have hidden a few columns but the column cell references are correct. The information I am wanting from this worksheet is The Golfer (A2), The Course (A1) and The Year (M1). Below is an example of what the SUMMARY worksheet looks like:


.....A.......M......N..................AB....................................AC
Pebble Beach20122013
Golfer A370=CONCATENATE(A2,A1,M1=CONCATENATE(A2,A1,N1)
Golfer B5-=CONCATENATE(A3,A1,M1=CONCATENATE(A3,A1,N1)
Golfer C61=CONCATENATE(A4,A1,M1=CONCATENATE(A3,A1,N1)
Golfer D22=CONCATENATE(A5,A1,M1=CONCATENATE(A3,A1,N1)

<tbody>
</tbody>

So in order for me to find out how golfer A did in 2012 at Pebble Beach I am looking up the concatenation from both worksheets using the following code: (The results of 3 would appear in cell M2 above.

=IF(ISNA(VLOOKUP(AB2,Results!$A:$B,2,FALSE)),"-",VLOOKUP(AB2,Results!$A:$B,2,FALSE))

However when I am trying to lookup 500 golfers at once it takes an absolute age to produce their results. Is there a better way I could do this so that it speeds up the lookup?

I look forward to hearing if anyone can speed up this process.
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I'd use something like this:

=IFERROR(VLOOKUP(AB2,Results!$A$1:$B$150000,2,0),"-")

points:
1) The iferror will cut down the number of lookups
2) The distinct range means you are not doing lookups in over 1million rows

Sorting the table on Results column A could also help, if you're free to do so.
 
Upvote 0
Thank you for the reply. This appears to have sped things up and it doesn't do as many 'calculating processors. It does however still take 6minutes to open the file and 35 seconds to change one fo the criteria but I think that may be down to my computer more than anything. Thanks for all your help!
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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