Vlookup processor hungry

Sunline

Well-known Member
Joined
Oct 6, 2007
Messages
701
Office Version
  1. 2016
Platform
  1. Windows
Hello all , using 2007 i have this Vlookup function , it also returns 0 if cell is blank .

=IF(DE2="",0,VLOOKUP(DE2,Sheet2!$A$1:$B$18,2,0))

I want to use this function for 10 too 20 cols but using just 3 of thses it takes forever too do a calculation , i have read on here that these are hungry , is there a quicker or better way to look at a cell then obtain the info from range $A$1:$B$18
Thanks .
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
For a VLOOKUP, the number of columns doesn't matter, the number of rows does.

For an exact match (last argument 0), Excel has to read the cells linearly; if the lookup table can be sorted in ascending order, you can change the formula to enable Excel to do a binary search, which is exponentially faster.

But if the data is only about 20 rows long as in your example, you'd never see the difference.
 
Upvote 0
Thanks for that , sheet 1 contains 170,000 rows and growing each week by approx 700 rows .
The lookup table (sheet2) is always in acending order .
Ive tried putting more than 3 of these funtions into each separate col but computer jams up .
Seems 3 is the limit for my comp , its not lacking power .
Thanks .
 
Upvote 0
=IF(DE2="",0,VLOOKUP(DE2,Sheet2!$A$1:$B$18,2,0))
Your example was for 18 rows, not 170,000

Try this:

=IF(DE2="", 0, IF(LOOKUP(DE2, Sheet2!$A$1:$A$10000) = DE2, LOOKUP(DE2, Sheet2!$A$1:$B$10000), 0))

Note that only the first column is used in the first lookup. Adjust row extents to suit.
 
Upvote 0
Thankyou , will give it a try after work tonight .
 
Upvote 0

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

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