Google Sheets Formula For Separating Items in a List

Viewed 24

I'm looking for help in writing a Google Sheets formula in Cell C1 with an input of this range in A1:B1 :

A B
122, 123, 124 Apple, Orange, Pear

and get an output of this:

C D
122 Apple, Orange, Pear
123 Apple, Orange, Pear
124 Apple, Orange, Pear
1 Answers

use:

=INDEX(SPLIT(FLATTEN(SPLIT(A1, ",")&"×"&B1), "×"))

enter image description here

Related