Hi Arba,
Assuming you just have the sheet1 data and a sheet2 with headers in row 1 (named as in your example workbook), the following macro should reorganize your data as requested:
Sub reorg()
Dim arr As Variant, i As Long, lastrow As Long
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = Sheets("BP ETM Dump")
Set ws2 = Sheets("HD Target Format")
lastrow = ws1.Range("A" & ws1.Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False
For i = 1 To lastrow
ws2.Cells(i + 1, 1).Resize(1, 3).Value = ws1.Cells(i, 1).Resize(1, 3).Value
If InStr(1, ws1.Cells(i, 4).Value, "[") > 0 Then
arr = Split(Replace(Replace(ws1.Cells(i, 4).Value, "]", ""), ",", "["), "[")
ws2.Cells(i + 1, 4).Resize(1, UBound(arr) + 1).Value = arr
End If
Next i
Application.ScreenUpdating = True
End Sub
Bookmarks