Separte columns for neg/pos values

G

Guest

I need to find a formula which will take the difference between two numbers
and put them in one column if it is a negative value and in another column if
it is a positive value. Help

Ginger
 
G

Guest

You'll need two formulas. Let's assume your numbers are in cells A1 and B1.
In C1, we'll show the difference if positive. In D1, we'll show the
difference if negative.

In C1:
=IF(A1-B1>=0,A1-B1,"")

In D1:
=IF(A1-B1<0,A1-B1,"")

HTH,
Elkar
 
B

Biff

Hi!

Suppose you want to subtract column B from column A. B1-A1, B2-A2, B3-A3,
etc.

Enter this formula in D1 for the positive results:

=IF(B1-A1>=0,B1-A1,"")

Enter this formula in E1 for the negative results:

=IF(B1-A1>=0,"",B1-A1)

Select both D1 and E1 and copy down as needed.

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top