0
votes

I have 2 rows.

Column A contains names Column B contains domain endings

I want to have all possible combinations displayed in column C. Basically for every row in column A, loop through all rows in column B, and then combine them, just like I have it in the example image. Seems quite simple, but I can't seem to get it working.

enter image description here

I have tried many things, but since spreadsheets are not my strong suit, I am not even sure on what keywords to google for.

Here are some of my failed attempts:

=arrayformula(A1:A5 & B1:B3)

=arrayformula(A1:A5 & {B1:B3})

=arrayformula(A1:A5 & arrayformula(B1:B3))

I don't really mind the order (loop through names first or loop through domain endings first), as long as all the combinations are displayed in row C.

1

1 Answers

2
votes

in C1 paste:

=ArrayFormula(transpose(split(rept(concatenate(A:A&char(9)),counta(B:B)),char(9)))&""& transpose(split(concatenate(rept(B:B&char(9),counta(A:A))),char(9))) )