# Subtract Two Cells. Result value

I want to subtract two numbers. The numbers are categorized, e.g. cell N2 (WAS) and N3 (IS). The cells populated are N1 thru N351. I want to calculate the difference between the two cells. If the N2 (WAS) cell is less than the N3 (IS) cell, e.g. N2 < N3, then it is a positive number. If N2 (WAS) cell is greater than the N3 (IS) cell, then it is a negative number. If the two cells are equal then the result would be 0.

Examples:

``````(WAS) Row 2-----N2 = 346.18-----(IS) Row 3-----N3 = 347.00-----M3 = 0.82

(WAS) Row 4-----N4 = 484.00-----(IS) Row 5-----N5 = 483.50-----M5 = -0.50

(WAS) Row 6-----N6 = 22.75-----(IS) Row 7-----N7 = 22.75-----M7 = 0.00
``````

Rows go from 2 thru 351.

In M2, insert the following formula and fill down ...

``````=IF(MOD(ROW(N2),2)=1,N2-N1,"")
``````

This will put nothing into every even numbered row. In every odd numbered row it will put the difference you need.

• You can use `ROW()` instead of `ROW(N2)`. – Scott Apr 25 '16 at 21:31
• Force of habit. 8) – OldUgly Apr 26 '16 at 2:48

Enter `=N3-N2` into cell `M3`.  Then select cells `M2` and `M3`, and drag down: 