Hi
Perhaps it may be better to do the total in Excel and not as custom cell:
If, as you say, your columns N and M data is working OK, then try this:
in cell reference O4 put the formula you want for row 4
then click the bottom right corner of cell O4 and drag it down column O
it should put the formula in all the rows in column O
see attached screenshot for a simple example, I used addition rather than multiplication.