I just noticed I did not click send on this email... sorry about that!
I made some updates to the sheet that I shared so if you click the link and make a copy you will be able to compare the code changes.
As you begin your journey into Google Apps Script coding, this little script is perfect to learn from. It is not complicated and does something that you will do everytime you code a spreadsheet. Have fun with the code, change things up and see what happens! As you will see a lot of coding is "code, test, fix, run, fix, run, try again, update code, research solutions, code, test..." then eventually you get to jump up and scream "Success!!!".. then you're off to your next issue!
Also, now that you have seen some code, the next time you try something on your own and reach out make sure you share what you have tried already!!! I don't know how many times I have done that and somebody in this group says "Hey, change your 2 to a 4 and everything will be ok." Or "Hey, you need to insert a row before you do that..." Simple things that you don't think about when you are in the middle of pulling your hair out!!