Thanks for such quick responses aitap and jwkrahn,
I am happy with the way my code cuts up the data but I am having a more fundamental problem with getting the loop to perform as I wish.

Could you suggest a way of getting the 2 sections of my own code into a single loop (I realise that jwkrahn suggested a slightly different method, and this is very much appreciated) but I would quite like to get my own technique running smoothly as well.