Moderator, Thank you for your kind help

the problem has not been completely resolved. The serial number in column A should be adjusted automatically. Don't modify it manually. Ask what to do? How to write the code?