Newbie wants to know how to write a simple formula

How do I write:
multiply the contents of cell D4 by cell N4, then add that to the sum of multiplying the contents of cell F4 by cell O4, and finally add to that the contents of cell P4.
I thought it might be:
=SUM ((D4*N4)+(F4*O4)+P4)
but I am getting an error at the second decimal place. I think there might be some rounding up going on. I have numbers in the cells that range up to four decimal places.
Any ideas what I am doing wrong?
Please keep the answers simple.
===Edit===
Slightly edited by @Lupp for readability.
@Shetland : Use the tool for Preformatted text when posting formulas or program code.
===/Edit===

Your formula should work though the usage of the SUM() function is supertfluous if you use + signs anyway to denote for addition.
Due to general preference precedence of operators ( "* before + ") the parentheses are also superfluous.
The result should be correct to (about) 16 decimal digits if there not a bad option like “Precision as shown” is enabled, and (some of) the source cells are formatted to show few places.
What was said about the precision also holds if not all the source cells show the full number of digits, but a formatted output which may hide additional places and look as if rounding had taken place.
An answer to more detail would require that you upload your example file.

2 Likes

precedence

Thanks. I think I see now what has happened. Thanks again for your patience.

Brilliant. I will check the decimal place settings, I am sure at least one column is set to 2 instead of 4.