Creating combinations

S

sweetas01

I want to create combinations from the below variables (A1:A5 & X, Y and Z
being cell references). Is there a formula that will allow me to do this?

X Y Z
A1 A G M
A2 D G
A3 A D G
A4 I
A5 A I
 
Top