Update:
If I defined range as input_range from A2:P29. Then If Enter in row 30, then it works. However, the Input_range is not automatically extended and I would like to shift the whole row down not only last row in the range. How could I achieve these two things?
Starting with the help of Siddharth Rout, I am able to make this work on new Excel file. However, no matter what I tried on this file
Sample Excel File – it just does not work. I guess there is some kind of structure to prevent from automating adding row. If so, how can I am able to make the code work?
When you’re detecting the Worksheet_Change() event, you need to have your code in the worksheet object, not in a module.
Here’s how to do it:
Make sure you see Worksheet and Change in the two drop-downs at the top of the editor.
Note: you should always have Option Explicit turned on to require variable declaration. Read this answer to see how to do it: https://stackoverflow.com/a/10653204/138938