View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stan Brown Stan Brown is offline
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/