Here is where all the data will go and where each the conditions are located A1:AG (Full Table Size - A1:G59):

Facility Spellcraft Craftsmanship Divine Economics Alchemy Warfare
RP S C D E A W
1
10
25

Here is where the data comes from J1:L18 (Full Table Size - J1:L169):

Facility RP Upgrade
S 1 Enchanting
C 1 Dummy Targets
D 1 Blessing
E 1 Coinage
A 1 Plague
W 1 Assault
S 10 Channeling
C 10 Cultivation
D 10 Inflame
E 10 Recycling
A 10 Transmutation
W 10 Dueling
C 25 Light Condenser
D 25 Cursing
E 25 Commerce
A 25 Deflagration
W 25 War Funds

Now what I want the formula to be placed in B3:G5. The Conditions needed are that they match the Facility (by using the Letters) and the RP Numbers. The result should have it where the Upgrades that match both conditions will appear in the formula locations.

For anything that doesn't match, I want a blank space or a - to appear.

I would prefer a formula that doesn't require a certain order to appear as I tend to sort the order of the second table. I also plan to format the Upgrade Column with different fill and text colors, so I want the formula also to copy the font format if it doesn't already do this itself.

Thanks for any and all help anyone can provide.