Could someone help me with code for the following please?

I would like to extend a formula down column J when new data is added to columns A to E. The formula in Col J is "=IF(E819="DR",J818+D819,J818-D819)". Then I want the same thing to happen to all the worksheets in the same workbook but could be starting from a different row. I guess the formula might not be important if I could just extend the formula from the last row in Column J.

Regards
John