Write instructions more clearly. The code you offer doesn't work.
I spent a fair bit of time trying to figure out what it is you expected me to do. I continuously ran into errors because there was zero clarity in the instructions as to what to enter and how.
Several cells it said to just run with shift enter, they return error message after error message.
This entire exercise was one of futility.