My data in col D has varying lengths. It also contains information in square brackets.
I want to copy the rows to another sheet and name the tab with the value in col D.
eg. col D
B58[3]
B58[2]
B58
JC-MC
JC-MC[2]
MA
MA[2]
Anything starting with B58 goes to the new tab, likewise any JC-MC or MA.
The new tabs are B58, JC-MC and MA.

SampleData.xlsx