The easiest way is to use Zero Values = OFF, but that's a global setting which applies to all zero values in your spreadsheet. If there are some zero values that you do want to display, you can't use that setting, but there are other techniques which will work.
GS750 wrote:"N5" has the total of "M5" x "D5" but ONLY if there is a $$ value in "M5", if not then i want it to stay blank
The standard way would be
=IF(ISBLANK(M5);"";M5*D5).
GS750 wrote:"O5" shows the total of GST (10%) of "N5" using this: =SUM(N5/10)
I'd use
=IF(ISBLANK(M5);"";N5*0.1). Using the SUM function is redundant.
GS750 wrote:And "P5" gives me the total price : =SUM(N5+O5)
=IF(ISBLANK(M5);"";N5+O5), or
=IF(ISBLANK(M5);"";SUM(N5;O5)) (meaning sum of numbers in N5 and O5), but
=IF(ISBLANK(M5);"";SUM(N5+O5)) would be redundant (to use both the SUM function and the + operator), but will work.
Another technique is to use Format > Cells > Numbers and add
;"" to the end of the Format Code in the cells which should not display zeros. Here's where it would have been helpful to see your actual spreadsheet to examine the format code in the cells. I'm guessing it's something like
[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00 so you would change that to [
$$-409]#,##0.00;[RED]-[$$-409]#,##0.00;"". If you add
;"" you don't have to test for ISBLANK(cell). Format;Format;"" means "don't display anything if the value is zero".
All of these ideas will keep cells N5, O5, and P5 blank if M5 is blank, whether or not you use Zero Values = OFF.
GS750 wrote:Finally followed through and stumbled upon this as well: =IF(M5>0;M5*D5)
This only works if you have Zero Values = OFF, but in that case you can simply use
=M5*D5.
GS750 wrote: display the $$ difference between "P", "K" and "G" cells
Difference suggests subtraction. Subtraction takes two operands. What sort of "difference" do you want for three operands in P, K, and G? Edit: I see you have another topic to explain that. |
For further postings, please do not simply attach a picture of the document— there are too many settings that can affect the content which cannot be determined from a picture. If is far more helpful to attach the actual document, or at least a small sample showing the problem. And you are more likely to get assistance because the volunteers don't have to take time to replicate your data/formulas in spreadsheets for testing of solutions.
If you're new to using Calc, it will help you to read Ten concepts that every Calc user should know.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).