Move cell contents left, if left cell is empty

I have an OpenRefine project where I have many subject columns, and many subject(places) columns. Not every column is filled for every record.

I want to move the contents of each column along to the left, if the left cell is empty - but only within specific column groups. So in the image above I would move 'Charleville' to Subject(Places)_1 but I wouldn't move 'North Strand' into Subjects_20.

I imagine the best way to do it is one column at a time, but I don't know how to do so. Is it possible?

Answering my own question.

I joined all columns in the same group (so all 'Subjects', all 'Subject)Places'). When joining select the option to 'Skip nulls' and use a separator character. I used '|'.

Then split the column based on the '|'. This creates new columns, but only as many as necessary so blank cells are avoided where possible.