Attempting to Perform a Query with Multiple Outputs based on Lookup of Inputs

jharbold

New Member
Joined
Feb 17, 2018
Messages
12
Hello,

I currently have a large amount of information in a sheet named "Code Requirements Database". In column A I have a code reference, in column B I have a section of the code, in column C I have the code requirement, and then in column D I have the required frequency. In column E I have the Component that the code requirement applies to, followed by the subsystem that the component applies to in column F, followed by the system type in column G.

In "Sheet 2" I have setup dynamic dropdowns such that I select a System in cell "B2" followed by a Subsystem (related to the input in "B2") in "C2" followed by a specific component in "D2" (related to the input in "C2").

I'd like to perform a macro such that the inputs in "Sheet 2" in cells B2, C2, and D2 are queried against the "Code Requirements Database" related cells in column G, F, and E. All TRUE values will then return the data in that row (r) of the "Code Requirements Database" such that "Sheet 2" cell "E2" will have the value of "Code Requirements Database" cell "Ar", "Sheet 2" cell "F2" will have the value of "Code Requirements Database" cell "Br", etc. until the values from rows A,B,C,D of "Code Requirements Database" are copied and pasted to "Sheet 2" cells E,F,G,H.

To make matters more complicated, the query will return multiple TRUE values and I would like all of the TRUE values to be returned at once vertically such that the second related code requirement will be pasted into "Sheet 2" row 3, third requirement will be pasted to row 4, until there are no more related TRUE responses from the query. I have attempted an ARRAY but the database is much too large for this to be convenient.

Thanks for the help!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
hi, Suggest you google for information on paramaterised queries in Excel. Requires no formulas & no VBA and is fine for large datasets. regards, Fazza
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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