This works perfectly! Thank you very much for your help/time. I feel a bit daft after seeing how (relatively) simple the solution actually was, but I've learned a lot from your code here. Thanks!
EDIT: Ah, thanks for the reworking! It was probably my sleep-drived incoherant question that caused the confusion! Thanks again.