formula for negative and positive numbers in different columns

S

s.m.hardin

Is there a way I that excel can know when a number is positive or negative
and put the correct sum in the correct coulumn?
 
G

Gary L Brown

Assumptions:
Cell A1 has a number
Cell B1 has Debits
Cell C1 has Credits

Formulas:
In Cell B1...
=if(A1>0,A1,"")
In Cell C1...
=if(A1<0,-A1,"")

HTH,
 
B

Bob Phillips

SUM doesn't need to know, it adds up correctly regardless.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
S

s.m.hardin

s.m.hardin said:
Is there a way I that excel can know when a number is positive or negative
and put the correct sum in the correct coulumn? here is an example so you know what I 'm asking. a1 has a positive number and b1 has a negative number, but in c1 is were the positive answer goes and d1 is were the nagative answer goes. Is there a certian formula that can do all that?
 
S

s.m.hardin

I will give a example of ehat I am talking about. a1 has a # and b1 has a #
c1 is were the positive answer goes and d1 is were the negative # goes. Is
there a formula that calculate that and put the +/- in the correct column?
 
B

Bob Phillips

C1: =SUM(IF(A1:B1>0,A1:B1))

D1: =SUM(IF(A1:B1<0,A1:B1))

which are both array formulae, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)


you know what I 'm asking. a1 has a positive number and b1 has a negative
number, but in c1 is were the positive answer goes and d1 is were the
nagative answer goes. Is there a certian formula that can do all that?
 
Top