Lookup many values quickly

ksaw

New Member
Joined
Jun 1, 2011
Messages
5
hello,

I am working with several very large files that are taking far too long to populate/save (nearly 20 minutes to save one file). The obvious reason for this is that I am using a substancial number of vlookups, and I am looking for perhaps a better alternative.

What I have is a sheet that will have transactions by store,by day, by type, by hour, and I am pulling them into a schedule. Currently, I have several thousand vlookup formulas that first concatenate the perspective cells, then vlookup to Data sheet!.

The data sheet is only 2 columns, column A has the concatenated title, and column B has the value I need.

Is there a faster way to do this? better yet, is there a way to do this from a linked worksheet (values will change monthly)?




FYI I am working in Excel 2007
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
hello,

I am working with several very large files that are taking far too long to populate/save (nearly 20 minutes to save one file). The obvious reason for this is that I am using a substancial number of vlookups, and I am looking for perhaps a better alternative.

What I have is a sheet that will have transactions by store,by day, by type, by hour, and I am pulling them into a schedule. Currently, I have several thousand vlookup formulas that first concatenate the perspective cells, then vlookup to Data sheet!.

The data sheet is only 2 columns, column A has the concatenated title, and column B has the value I need.

Is there a faster way to do this? better yet, is there a way to do this from a linked worksheet (values will change monthly)?




FYI I am working in Excel 2007

Is A:B sorted on A, the match range? If so, what is the current VLOOKUP fomula you are invoking?
 
Upvote 0
Yes it is..currently this is a sample of the vlookup. But, the concatenated cells change with each lookup formula (H1 changes each sheet, B1 changes each day of the week, C5 changes each row, and D9 changes each column)



VLOOKUP(CONCATENATE($H$1,$B$1,$C5,D$9),Data!$A:$B,2,FALSE)
 
Upvote 0
How about,

Code:
=IF(LOOKUP($H$1&$B$1&$C5&D$9, Data!$A:$A) = $H$1&$B$1&$C5&D$9, 
    LOOKUP($H$1&$B$1&$C5&D$9, Data!$A:$B), NA())
Two binary searches should be much faster than one linear search if you have a lot of data.
 
Upvote 0
Yes it is..currently this is a sample of the vlookup. But, the concatenated cells change with each lookup formula (H1 changes each sheet, B1 changes each day of the week, C5 changes each row, and D9 changes each column)



VLOOKUP(CONCATENATE($H$1,$B$1,$C5,D$9),Data!$A:$B,2,FALSE)

Try the following set up...
Code:
=IF(LOOKUP($H$1&$B$1&$C5&D$9,Data!$A:$A)=$H$1&$B$1&$C5&D$9,
    LOOKUP($H$1&$B$1&$C5&D$9,Data!$A:$A,Data!$B:$B),"")

Would you report back how the performance is affected?
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

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