I'm messing around with Google Sheets today, and I'm trying to put together a balance sheet similar to the one my bank uses. Its got both a credit and debit field in each row and a running balance to the far right. I'm kinda new to this, so I'm learning as I go.I've got it set up like so - cell E2 has the following formula:=sum(c2:d2)While cells E3 and beyond have:=(C4*-1)+D4+E3It works for the most part, but if you'll notice cells E6 onwards each have the same value as a result of the formula being applied to every cell in that column. Is there any way to hide the balance value or change it to 0 if the debit/credit field is empty, just for layout purposes?edit:It's supposed to be a running balance of an account. So the end result is like thisDEBIT     CREDIT     BALANCE     DATE          5          5           05 Feb 20151                    4           06 Feb 2015          10         14          07 Feb 20158                    6           09 Feb 2015But just to re-iterate, my issue isn't so much with the formula but rather with the way it displays the total.I'm looking for something like this (I zeroed out E5-E11 by hand):The balance should display P0.00, or be blank, when the line is empty. 
How to get a running balance?
google spreadsheets
I'd use this formula in E3 and copy down:=IF(AND(E2<>,OR(C3<>,D3<>)),E2-C3+D3,)EXPLANATION:The IF statement contains 3 comma separated parameters:logical_expressionvalue_if_truevalue_if_falseIn this case the logical expression is AND(E2<>,OR(C3<>,D3<>)).AND takes multiple logical expressions as comma separated parameters, and returns TRUE only if all expressions are true. In this case these two:E2<>OR(C3<>,D3<>)Number one checks if there is anything in the cell above (if it's not equal to nothing).Number two is an OR function, works as AND but returns TRUE if only one or more of the expressions are true. In this case:C3 (the Debit value on this row) is not emptyD3 (the Credit value on this row) is not emptySo to summarizeIf the cell above has a value, and Debit or Credit has a value. The value_if_true is used. In the example: E2-C3+D3 (the cell above minus Debit plus Credit).If the expression evaluates to false, the value_if_false is used, in this case  (an empty string).