Search for Each Comma-separated Value from Strings

Problem description

In the following Excel file, there is a row of two columns containing comma-separated values, as shown below:

undefined

We are trying to split each value by comma, reorganize the split values as a two-dimensional table, and put it in Sheet2. The desired result is as follows:

undefined

 

Directions

1.  Open esProc and create a new file.

2.   Write the following code:

A

B

1

=clipboard().split@n("\t")(1)

2

=A1.(~.split@c())

3

=A2(1).([~,A2(2)(#)]).concat@n("\t")

A1   Copy data area A1:B1 in the Excel file, paste it onto the clipboard, and get the first values from the columns to split them into a sequence (as there is only one row).

A2  Split each member value into a sequence by comma.

A3   Reconstruct the second column as a two-dimensional table according to the first column, and concatenate values into a large string.

 

3.  After the program is executed, copy A3’s content and paste it into cell A1 on Sheet 2 in Excel.

Q & A Collection

https://stackoverflow.com/questions/63710376/how-to-vlookup-each-comma-separated-value-from-range