for example:
(x=input and y=output)
z=0
x=5 x=6 x=3
y=2 y=4 y=0
z=z+(x-y)
z=0+(5-2)=3
z=3+(6-4)=2
z=2+(3-0)=5
It`s easy to do it on C, but I do not manage to do it on excel.
I do not need to save the input/output history.
All I want is to keep track of the Z variable ( the z to be updated)
I want to manage a very simple stock with EXCEL as follow:?
in A1 put ur 'x' value and further values in 2,3,4 rows
in B1 column put ur 'y' value
in C1 column put this formula
= a1-b1
in C2 column put this formula
= C1+(A2-B2)
and further copy formula from C2 to further rows
C3,C4,C5...
Reply:Put the three values in tree columns (Say A, B and C in respect)
Now, we have this
Cell , equals to
A1, 5
B1, 2
A2, 6
B2, 4
A3, 3
B2, 0
Now in C1 (The value of z), paste this function
=A1-B1
In C2, paste this
=C1 + (A2-B2)
copy C2 to the cells below to get the value of Z for each row
Enjoy my profile, I am the VBAXLMan
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment