What do you think would be quicker?

alexcn

Board Regular
Joined
Apr 8, 2003
Messages
64
... and why ...

1) Looking up a multiplier value from another excel worksheet by way of an excel lookup formula?
2) Looking up a multiplier value from an Access database by way of a VBA function in Excel and returning the value?
3) Looking up a multiplier value from an SQL database by way of a VBA function in Excel and returning the value?

Many thanks,

Alex
 

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).

Stormseed

Banned
Joined
Sep 18, 2006
Messages
3,274
Depends on what data, the type of data, size of data, connectivity, etc., you are looking up.
 
Upvote 0

alexcn

Board Regular
Joined
Apr 8, 2003
Messages
64
Thanks for reply!

Basically looking up price values / contract specifications in a centralised database (held in either Excel Lists or Access or SQL) So the search would be denoted based on two / three criteria (usually an item code, a department code and an effective date) the data returned would either be a price to 6 decimal places, or a text string no greater than 50 characters.

Connection would be either internal Microsoft.Jet.OLEDB.4.0 on the same network, or an externally hosted SQL server connecting over a standard internet connection.

I am more thinking of semantics than anything else ...

Depends on what data, the type of data, size of data, connectivity, etc., you are looking up.
 
Upvote 0

Fazza

MrExcel MVP
Joined
May 17, 2006
Messages
9,368
Hi Alex,

IMO looking up by suitable worksheet function to another worksheet should be fastest. Worksheet functions are intrinsically faster than the other options.

However, I'm assuming a single lookup code. Such as by concatenating - maybe into a hard coded (non-formula) value - the two or three criteria to give a single value that can be matched/looked up to the table.

Sometimes SUMPRODUCT or array formulas are used to do look ups with multiple criteria and these are not efficient and not fast - and in fact can have very poor performance.

If you have multiple fields to match on, an alternative to using a function might be to use SQL - and either join the tables or put the matching criteria in a WHERE clause. If this is suitable for your application, such a database style approach can offer advantages. My guess is this may not suit exactly what you want.

HTH, Fazza
 
Upvote 0

alexcn

Board Regular
Joined
Apr 8, 2003
Messages
64
Thanks Fazza - I will investigate your comments and revert in due course.

Hi Alex,

IMO looking up by suitable worksheet function to another worksheet should be fastest. Worksheet functions are intrinsically faster than the other options.

However, I'm assuming a single lookup code. Such as by concatenating - maybe into a hard coded (non-formula) value - the two or three criteria to give a single value that can be matched/looked up to the table.

Sometimes SUMPRODUCT or array formulas are used to do look ups with multiple criteria and these are not efficient and not fast - and in fact can have very poor performance.

If you have multiple fields to match on, an alternative to using a function might be to use SQL - and either join the tables or put the matching criteria in a WHERE clause. If this is suitable for your application, such a database style approach can offer advantages. My guess is this may not suit exactly what you want.

HTH, Fazza
 
Upvote 0

Forum statistics

Threads
1,190,916
Messages
5,983,572
Members
439,850
Latest member
suhailrocks786

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
Top