ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formula for negative and positive numbers in different columns (https://www.excelbanter.com/excel-worksheet-functions/62311-formula-negative-positive-numbers-different-columns.html)

s.m.hardin

formula for negative and positive numbers in different columns
 
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?

Gary L Brown

formula for negative and positive numbers in different columns
 
Assumptions:
Cell A1 has a number
Cell B1 has Debits
Cell C1 has Credits

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

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"s.m.hardin" wrote:

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?


Bob Phillips

formula for negative and positive numbers in different columns
 
SUM doesn't need to know, it adds up correctly regardless.

--

HTH

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


"s.m.hardin" wrote in message
...
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?




s.m.hardin

formula for negative and positive numbers in different columns
 


"s.m.hardin" wrote:

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.m.hardin

formula for negative and positive numbers in different columns
 
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?
"Gary L Brown" wrote:

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

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

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"s.m.hardin" wrote:

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?


Bob Phillips

formula for negative and positive numbers in different columns
 
C1: =SUM(IF(A1:B10,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)


"s.m.hardin" wrote in message
...


"s.m.hardin" wrote:

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?




All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com