It's not clear to me what you're working with yet. I can see what you're trying to do, but not what you're getting back.
For splitting a character variable into an unknown number of columns, see the approaches mentioned in the thread below: