Thanks for all the responses.
I am currently using the splice command in my script.
It seems it is leaving blank data in row $i. When I view my table after using the splice command, the row $i data is replaced with blank data rather than being completely removed.
I will try the delete function also to see if it works.
Twitchy Eye