Consolidating arrays

rharn

Board Regular
Joined
Jun 21, 2011
Messages
54
Hello Everyone,

I am currently working on a VBA function that will allow a user form to search through a database based off of up to 3 properties. The user will be allowed to select which properties they want to search for. As a result, with the way I have set up my code, each combobox will allow a user to select 1 property and I populate the search results into an array for reach combobox.

I am stuck on the final step of this code because I need to display the results of the search onto a work sheet. So I need a way to consolidate the three arrays from each combobox into a final "results" array that only display data entries selected by all of the combobox arrays. Would anyone have any suggestions on how I would set up this "consolidation" process? Since the user will be allowed to select up to three properties to search for it is not necessarily follow that all 3 must be selected, 1 and 2 maybe the only one selected or 3 only, etc,etc. Would I need to write code for each permutation? or is there a way to take into consideration all of the different ways a user can select properties to search? Any advice would be greatly appreciated! And please let me know if you need further clarification on the problem.

Thanks!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,224,598
Messages
6,179,820
Members
452,946
Latest member
JoseDavid

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