I have data as below
name subject
a m1
b m2
c m1, m3
d m4, m5, m6
e m7
I would like to duplicate entire row where column subject
contains ,
. The original data has many more columns than shown here. I will duplicate a row equal to number of ,
in the subject
column, so I will repeat c
1 times and d
2 times
I don't know how many cells in the subject
column would have ,
and there is no upper limit to number of values in a cell of the subject
column
Then I would like to keep only one value on the duplicated rows such that all values from the subject column appear once
name subject
a m1
b m2
c m1
c m3
d m4
d m5
d m6
e m7