Build a button, and attach that code to it. The code CANNOT make changes to the sheet, without a HUMAN interaction. Which is why you can RUN it manually, but it won't change when you use the sheet. Click a button and it will work! This is by design, and there is no turning this off!