i have an excel sheet1 with the following values
I want to write a macro to do the following:
(col A only has positive values, Col B has both positive and negetive values) I want to find the difference between the +ve and -ve values, keeping in mind the following;
if col A's value is less than col B's Values, (Eg: 1 -3) the result should be -2
if col A's value is equal than col B's Values, (Eg: 1 -1) the result should be 0
if col A's value is less than col B's Values, (Eg: 1 3) the result should be 2
QtyA QtyB
1 -1
1 -2
2 -2
3 1
1 -5
1 -3
5 2
1 1
2 3
5 -2
1 1
1 -1
6 -5
7 9
8 3
I want Col D to have the difference between the ColA And Col B.
The result should be this:
QtyA QtyB Result
1 -1 0
1 -2 -1
2 -2 0
3 1 2
1 -5 -4
1 -3 -2
5 2 3
1 1 0
2 3 1
5 -2 3
1 1 0
1 -1 0
6 -5 1
7 9 2
8 3 5
Bookmarks