Hi KjBox, I've come across an issue when I use the code on the actual spreadsheet. The actual Part numbers can differ in length i.e PN001 PN123456 which I didn't show on my example.
I believe the issue is on line 15
" If Len(Trim(z(ii))) = 8 Then" - I changed the value to 8 to allow for the longer part numbers, however after doing this shorter part numbers in the same cell now get deleted.
Is there a way to set this to a range i.e. between 4 and 8?
Thanks again.