Enter the formula you want in J4, with J4 the active cell, go to the vba immediate window and enter
Code:
? activecell.FormulaR1C1
hit enter and you'll see what the code is for that formula, except that the quotes need doubled up, have your code put this into J4 only, then use .autofill to copy down as necessary.