 # Petty Cash Template - Keep cell blank until data entered

• Hi,

I'm creating a petty cash template for work and I need to show the updated balance after each transaction. Right now to get the updated balance I'm using the formula =SUM((E6+C7)-D7) and then =SUM(E7+C8)-D8) and so on and so forth. How do I keep the balance column blank until data is entered?

forum.ozgrid.com/index.php?attachment/68990/

Thanks

## Files

• Re: Petty Cash Template - Keep cell blank until data entered

Format the cells using a custom format: 0;-0;;@

To hide all 0's you can change the Excel options
Options > Advanced > Display Options for this Workbook > 'Show a zero in cells that have zero value' checkbox

• Re: Petty Cash Template - Keep cell blank until data entered

If you want you can use something like =if(or(E6="",C7="",D7=""),"",SUM((E6+C7)-D7)). This will make it so that if any of the three cells is empty the cell with the formula is empty else it has the sum. now if you wanted it to show a number whenever any of the cells have something inn them then swap out the and for an or eg. =if(and(E6="",C7="",D7=""),"",SUM((E6+C7)-D7)). This will make it so that if for example C7 = 50 and the other two are blank then the cell with the number will show 50.

I am not sure though that you need to use the SUM formula. you should be able to just do =(E6+C7)-D7 or even just =E6+C7-D7. The SUM formula is really meant for instances where you are giving a range eg. =sum(E6:E9) or =sum(E6:F8)

• Re: Petty Cash Template - Keep cell blank until data entered

You can use an IF function to control this but this will increase the number of calculations performed. Hiding zeros would not need the change in the formulas, but you would have unnecessary formulas calculating.

Another option is to use a Table. One of the features of a Table is that as data is added then formulas are automatically added in the new row. See the second option in this example

Calculated Fields in Excel Table

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!