Thanks for your suggestions. They have inspired me to a pretty good solution. The only downside is the massive processing power needed.
Making a hard reference from one cell in Table 2 to the corresponding cell in Table 1 wasn't ideal because it would break stuff if you continue working on either table (=> inserting or adding rows and columns).
So I went to basically mirror Table 1 in the second table plus adding spare rows and columns in case Table 1 was edited to have more meals and ingredients.
The formula for mirroring is done with INDIRECT( ADDRESS( ROW(), COLUMN() ... . This always shows the content of Table 1 in the current relative position, regardless what you do in Table 1.
That formula is wrapped in three IF function to detect whether the corresponding cell contains an x or nothing or some different text.
If it has an x, then ROW() was replaced with "1" which is the row where the title is (Sugar). So it basically fetches the title of the column.
The second IF wrapper replaces empty cells (LEN = 0) with "" because it would otherwise display 0.
The last wrapper is an IFERROR to avoid those pretty little red triangles.
Neat addition: If you enter text instead of an x, for example "may contain traces", it will append it to the ingedient. => "Peanuts (may contain traces)"
The second step was to compile a text string from that table. The output should be:
Pancakes | Flour, Sugar, Milk
The only solution that I found was to daisychain cells in a row. B2 & C2 & D2 & ... and add colons in between.
B2 & ", " & C2 & ", " & D2 & ", " & E2 ... I wish there was an auto-chain like CHAIN(2:2) to make it scalable for additional columns.
Due to a lot of empty cells, there were a lot of access colons: Sugar, , , , , Salt, , , Pepper
They are stripped with a cascade of multiple CHANGE wrappers to replace duble colons with a single colon. To avoid a leading colon, I added a single colon manually in front so it could be stripped by the above replacement. The trailing colon after the last ingredient was stripped in a separate formula in the next step. I couldn't find out how to do it otherwise.
The third step is a third table where I can freely enter any of those meals in order to display the ingredients. It's a simple lookup formula fetching the ingredient list from Table 2.
Opening the file takes about 30 seconds of calculating even on a 2,3 GHz 16GB MBP. Table 1 has approx 100 rows and 35 columns, Table 2 double the amount to account for more entries in the future.
The weak point is the daisychaining because it isn't scalable (without altering the formula) and it takes most of the processing power.
=> Any ideas for a better route here?
(Apologies for my sub-ideal texting as english isn't my native language. I'm trying my best. Please ask me if there is something you don't understand.)
Step 1 – a.k.a. Table 1:

Step 2 – Convert x to words:

Step 3 – Clean up the list
