I am sorry to bother people with a question that has been asked a hundred times.

I have data in column D and Trim(D) in column E (column E is supposed to be hidden for users)

Therefore I need to make sure that if someone inserts a row in between - it will be filled up with formula from above, however cell reference will need to add 1..

I did look through other posts and tried to amend their codes, however, I was unsuccessful.

I imagine that logic would be something like: copy formula from the cell above (which is going to be Trim(D(n+1)) while there is a number in the respective D cell, otherwise exit that loop.

Could you please help me with the code?

Thank you for your time