Hi all, here is what I am trying to do:
I have comma separated values (Variants) mapped with unique description. I am trying to split the values in new rows, but keeping the original description.
This code from DanteAmor works great for the split, but I can not modify it to return the descriptions.
Thanks in advance for you can help.
I have comma separated values (Variants) mapped with unique description. I am trying to split the values in new rows, but keeping the original description.
This code from DanteAmor works great for the split, but I can not modify it to return the descriptions.
VBA Code:
Sub test_Comma()
Dim n As Long
Dim Cell As Range
Dim itm As Variant
n = Sheets(2).Range("B" & Rows.Count).End(3).Row
For Each Cell In Sheets(1).Range("A1", Sheets(1).Range("A" & Rows.Count).End(3))
For Each itm In Split(Cell, ",") 'Split cells 'iterate through the array
n = n + 1
Sheets(2).Range("B" & n).Value = Trim(itm)
Next itm
Next Cell
End Sub
Thanks in advance for you can help.