OK. Unfortunately the resulting file is too large for upload (@ 7+ meg).
Here are the formulas. The first four go into Name Manager. They are dynamic named ranges that the rest of the formulas use:
DropFiller is used for your Data Validation formula. It makes cell D1 work. The rest are used in the following array entered formulas:
Be sure that the last row of column A Sheet2 contains ":::End of data".
Correction: this first one is non-array. Enter this non-array formula in B2 Sheet2 and fill down to B99897.
The rest of these are array formulas:
Enter this one in F1 Sheet3. Committed with Ctrl + Shift + Enter and fill down far enough to accommodate your longest anticipated query return. I filled down @ 160+ rows.
This next one goes into I1 Sheet3 array entered it only goes in this one cell:
Preselect I2:I100 (probably overkill, but one of your recipes had @ 70 rows). Array commit this entire range all at once with this formula:
For added help (not essential, but might help you to verify your output) this single array formula in say L1 of Sheet2; it will tell you the address of your recipe ingredients on Sheet 2.
Once saved this takes over 1 minute to load/calculate and be ready to work with. That's with only the 100,000 rows in your sample. With 300,000+ rows you indicated I don't know how much longer this will take. "Not Responding" messages flash momentarily on my machine. They go away. Subsequent calculations are taking my machine @20 seconds.
For your consideration I've taken the liberty of uploading a file of two proposed alternative data layouts. I feel confident that data layout changes like these will enable your sheet to be immensely streamlined.
Hope this works well.
Bookmarks