Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default negative and positive sums

How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default negative and positive sums

try
=if(A2<0,A2-A1,A2+A1)
or
=A2+if(A2<0,-A1,A1)
or
=A2+Sign(A2)*A1

"Chad" wrote:

How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?

Thanks for your help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default negative and positive sums

Try this:

=IF(A2<0,A2-A1,A2+A1)

Hope this helps.

Pete

On Jul 25, 5:00 pm, Chad wrote:
How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?

Thanks for your help



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default negative and positive sums

Try this:

=(ABS(A2)+A1)*SIGN(A2)


"Chad" wrote:

How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?

Thanks for your help

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default negative and positive sums

Thanks. This was a BIG help! my report wil lbe done on time.

Thanks again

"Teethless mama" wrote:

Try this:

=(ABS(A2)+A1)*SIGN(A2)


"Chad" wrote:

How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?

Thanks for your help



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default negative and positive sums

Thanks. This was a BIG help! my report wil lbe done on time.

Thanks again

"Pete_UK" wrote:

Try this:

=IF(A2<0,A2-A1,A2+A1)

Hope this helps.

Pete

On Jul 25, 5:00 pm, Chad wrote:
How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?

Thanks for your help




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default negative and positive sums

Thanks. This was a BIG help! my report wil lbe done on time.

Thanks again

"bj" wrote:

try
=if(A2<0,A2-A1,A2+A1)
or
=A2+if(A2<0,-A1,A1)
or
=A2+Sign(A2)*A1

"Chad" wrote:

How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?

Thanks for your help

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default negative and positive sums

You're welcome - thanks for taking the trouble to feed back to us
individually.

Pete

On Jul 26, 9:18 am, Chad wrote:
Thanks. This was a BIG help! my report wil lbe done on time.

Thanks again



"Pete_UK" wrote:
Try this:


=IF(A2<0,A2-A1,A2+A1)


Hope this helps.


Pete


On Jul 25, 5:00 pm, Chad wrote:
How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?


Thanks for your help- Hide quoted text -


- Show quoted text -



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 524
Default negative and positive sums

Wed, 25 Jul 2007 09:00:03 -0700 from Chad
:
How do I create a formula that subracts A1 from A2 if A2 is a negative
number, but adds A1 and A2 if A2 is a positive number?


If you mean what you said, it's
=A2+SIGN(A2)*A1

But I suspect you meant something different.

--
"The internet is famously powered by the twin engines of
bitterness and contempt." -- Nathan Rabin, /The Onion/
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some Positive, Some Negative Marsh Excel Worksheet Functions 3 December 16th 06 08:57 PM
post positive sum as a negative? help! Brainless_in_Boston Excel Worksheet Functions 1 March 24th 06 08:19 AM
IF positive/If negative???? CadensDad Excel Worksheet Functions 1 October 14th 05 02:15 PM
Formula to make Negative Values Positive & Positive Values Negative? mustard Excel Discussion (Misc queries) 4 September 26th 05 10:05 PM
Convert positive # to negative bgn2 Excel Discussion (Misc queries) 1 September 2nd 05 02:22 AM


All times are GMT +1. The time now is 09:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"