self calculate

E

ecurb849

How do I enter a formula that self calculates every time data is entered
such as in out and balance

in out bal
100 100
100 200
50 150 every time something is entered in the in collum or
the out collum
the balance automaticly changes.
 
M

Mike

=In - Out = Bal
=Bal + In - Out = Bal
Put this in Cell C1 =A1-B1
Put this in Cell C2 =C1+A2-B2 Drag down column C
 
M

MartinW

Hi, try this

Put this formula in C2 and drag down as far as is needed
=IF(COUNT(A2:B2)=0,"",IF(A2,C1+A2,C1-B2))

Put your starting balance in C1
Your first input cell is either A2 or B2

To drag a cell,
Click on the cell
Hover your cursor over the liitle box at the bottom right of cell
When your cursor changes to a small cross click and hold
on it and drag it down to where you want, then let it go.

HTH
Martin
 
E

ecurb849

DO I JUST DRAG C2 DOWN?

MartinW said:
Hi, try this

Put this formula in C2 and drag down as far as is needed
=IF(COUNT(A2:B2)=0,"",IF(A2,C1+A2,C1-B2))

Put your starting balance in C1
Your first input cell is either A2 or B2

To drag a cell,
Click on the cell
Hover your cursor over the liitle box at the bottom right of cell
When your cursor changes to a small cross click and hold
on it and drag it down to where you want, then let it go.

HTH
Martin
 
E

ecurb849

Thankyou just what I wanted.

MartinW said:
Hi, try this

Put this formula in C2 and drag down as far as is needed
=IF(COUNT(A2:B2)=0,"",IF(A2,C1+A2,C1-B2))

Put your starting balance in C1
Your first input cell is either A2 or B2

To drag a cell,
Click on the cell
Hover your cursor over the liitle box at the bottom right of cell
When your cursor changes to a small cross click and hold
on it and drag it down to where you want, then let it go.

HTH
Martin
 
M

MartinW

Yes, if the little black box at the bottom right of the highlighted
cell is not showing up you will need to go to
Tools>Options>Edit tab and make sure that
'Allow cell drag and drop' is checked.

HTH
Martin
 
M

MartinW

Glad you got it sorted.

Just for the record Mike's formula is more efficient
so the final formula should be
IF(COUNT(A2:B2)=0,"",C1+A2-B2)

Regards
Martin
 
Top