How to put Zero in a cell

D

Dobbin0_4

i have created a balance sheet with this formula to calculate the remaining
balance

=SUM(E5-D6+C6)

However this leaves the value from the cell the calculation was taken from i.e
if cell E5 returns a value of 200 the cell E6 returns the same value. How
can i make cell E6 return a 0 value untill data is added to either column's
"C or D"

I hope this is ok to understand.
 
K

Kevin B

The following IF will do it for you:

=IF(OR(D6=0,C6=0),0,E5-D6+C6)

Which says if D6 or C6 = 0 then 0, else E5-D6+C6
 
N

ND Pard

instead of your formula =Sum(E5-D6+C6)

use

=If(Or(D6<>0,C6<>0),E5-D6+C6,0)

Good Luck
 
D

Dobbin0_4

hi kevin i have tried your formula and it works partly, the problem is this
when i enter a value in C6 it doesn't show the calculation in E6 i.e. giving
a value of E5+C6.
But when i put a value in D6 it shows the calculation of E5-D6.
I copeid you formula to the character! what am i doing wrong?!
 
T

Tom Hutchins

Try this (note the AND instead of OR):

=IF(AND(D6=0,C6=0),0,E5-D6+C6)

Hope this helps,

Hutch
 
D

Dobbin0_4

Hi Kevin B
Thanks so much for your help, I was unsure of what you meant and couldn't
figure it out to start with. But now i am fully on board and it has saved me
a lot of hassle with the business system i am creating. i figure that you can
use the if/or function for pretty much anything. Am i right? need to get the
excel bible!

Thanks so much again

Dobbin04
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top