Wednesday, December 29, 2010

Excel – Separating positive and negative numbers:

Problem:

One column contains mixed values of positive and negative numbers, needs to be
Separated into two columns, in the first column positive values in second column negative values.
Finally, add a formula to return running balance along the cells in a third column.

Solution:

Steps 1 - Into cell B2 enter the formula:

=IF($A2>=0,$A2,"") and then copy the formula down to all cells in the range of data of column A.

Steps 2 - Into cell C2 enter the formula: =IF($B2="",$A2,"") and again copy the formula down.

Steps 3 - Into cell D2 enter the formula: =SUM(A2:B2).

Step 4 - Into cell D3 enter the formula:=D2+SUM(A3:A3) and copy the formula down the remainder of the range.