#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Robert
 
Posts: n/a
Default if equation

i am trying to come up with a formula that will subtract if the value in one
cell is negative or will add if the value in the same cell is positive
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default if equation

add or subtract what? Please be detailed with your questions, otherwise we
are stabbing at the dark. These examples might help you. If not, then
please provide the input data you have and the outcome you want.

Example 1:
A1 12
A2 -4
A3 =A1+A2
this will subtract A2 from A1 resulting in 8

Example 2:
A1 12
A2 3
A3 -67
A4 =A1+A2*A3/ABS(A3)
this will subtract A2 from A1 resulting 9

"Robert" wrote:

i am trying to come up with a formula that will subtract if the value in one
cell is negative or will add if the value in the same cell is positive

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default if equation

2nd example could also be

=IF(A30,A1+A2,A1-A2)

will result in the same number.

"Sloth" wrote:

add or subtract what? Please be detailed with your questions, otherwise we
are stabbing at the dark. These examples might help you. If not, then
please provide the input data you have and the outcome you want.

Example 1:
A1 12
A2 -4
A3 =A1+A2
this will subtract A2 from A1 resulting in 8

Example 2:
A1 12
A2 3
A3 -67
A4 =A1+A2*A3/ABS(A3)
this will subtract A2 from A1 resulting 9

"Robert" wrote:

i am trying to come up with a formula that will subtract if the value in one
cell is negative or will add if the value in the same cell is positive

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kjs
 
Posts: n/a
Default if equation

"Robert" wrote in message
...
i am trying to come up with a formula that will subtract if the value in
one
cell is negative or will add if the value in the same cell is positive


A1=2; A2=3
A3=A1+A2*SIGN(A2)
Now put a negative in A2.

kjs


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
To find equation for two sets of non contiguous data vijaya Charts and Charting in Excel 2 November 7th 05 03:46 AM
Equation Editor- problem when editing an equation Gaby L. Excel Discussion (Misc queries) 0 September 27th 05 09:24 PM
Need Help with #N/A in equation mkerstei Excel Discussion (Misc queries) 7 July 29th 05 09:03 PM
Averaging/Rounding Equation Problem Hansel Excel Worksheet Functions 3 June 28th 05 08:47 PM
Averaging/Rounding Equation problem Hansel Excel Discussion (Misc queries) 4 June 28th 05 08:45 PM


All times are GMT +1. The time now is 06:22 AM.

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"