Range of parameters for Excel MSQuery with SQL DB2

dellzy

Board Regular
Joined
Apr 24, 2013
Messages
146
Hi Experts,

Been trying to look all over the net for this solution for months already but to no avail. :( Wish I can have some answers from the experts here. Here's my story.
I have a long list of insurance policy numbers which I extracted via MSQuery into Excel sheet. Then, I need to get each of that policy number as a search key to query multiple tables in dbase and return values from certain fields when match. I understand that I can use "parameter" in MSQuery so that my next query is based on the value in the cell I defined in "parameter". It works for a few count of policy numbers but I don't think it's practical for me to declare if the total policy numbers is more than 1000 counts. So, is there a better workaround, please?

Currently, we are using a macro which auto-query each policy number placed in one cell. Every returned values will be copied and paste next to the original extraction list. This is working but it takes more than 2 hours to finish because it's checking one number to 5 tables sequentially. I wish to make it simultaneously and that will shorten the process time. Unfortunately, I don't seem to see the solution to do for a long list of parameters. The one I found was relevant for date range where we declare 2 dates into 2 parameters and query result will be based on those match the date range. But I cannot do this for the policy numbers because they are not running numbers.

I hope my explanation is sufficient. I don't know how to explain this in a simpler way.

Thank you in advance.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,215,034
Messages
6,122,782
Members
449,095
Latest member
m_smith_solihull

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