Formulas for Cartessian cross-join in Google Sheets

Home   »   Formulas for Cartessian cross-join in Google Sheets

=ArrayFormula(
 VLOOKUP( 
  CEILING(ROW(OFFSET(INDIRECT("A1"),,,COUNTA(A2:A)*COUNTA(B2:B)))/COUNTA(B2:B)) , 
  {ROW(A2:A)-row(A1),A2:A} , 2, )
 )

Leave a Reply

Your email address will not be published. Required fields are marked *