Thanks very much for your work.

I understand some of it but again would be grateful for some commentary as to what (especially the 2nd sub) is doing and any clue as to how it can be further developed.

Assume case 1 is column A & case 2 column B

In case 2 are you assigning a number (based on cell value in B) to 'infill'?

regards
Jon