Thank you for your help. I have had to learn Javascript myself, so I am not as proficient as I could be. I knew that it should be possible to use count - 1 to specify the last row instance, but I didn't think (or know how) to use a variable to define this. Thank you for your help.