Formula problem

J

J Field

I have two formulas I'm using:

=if(c2=0,d2,c2+d2)

the result of the above formula is to be entered into D2.

=if(b2=0,e2,b2+e2)

the result of the above formula is to be entered into E2.

My problem:

When I enter a number into c2 the number is being added to D2(which it
is supposed to), but the number entered into c2 is also being added to
E2.
I am having the same problem when entering a number into b2.

What am I doing wrong here?
 
A

Arvi Laanemets

Hi

Excel cell or contains value, or contains formula, but never both of them.
So let's assume you had some value in D2. When you entered the formula into
same cell, you did overwrite this value, and now is there only the formula
itself. To what it has to add the value of c2, or what does it display when
C2=0? And I don't mention here the circular reference at all.

Only way to make things like that to work is to use worksheet change event
(with must include rance checking routine, or it is fired for every single
cell on worksheet). But it can very easily go wild - there is no way back
except negative entries or closing workbook without save, whenever you type
accidentally some wrong number into cell.
 

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