I have codes that are grouped together by their taxability in certain states like this:

Basically I need to separate the groups so each code has all the states assigned individually like this:

I have tried a couple different solutions, but no luck so any feedback from ya'll would be tremendously helpful.
Thanks,