Subtracting if positive value and get the sum if negative value

lemmorsojedirdam16

New Member
Joined
Mar 16, 2018
Messages
13
Hi,

I’m trying to figure out for a week trying to research what could be the formula for below

for instance
A1 = 87.5
A2 = -4.0
the answer should be 91.5 (87.5 + 4= 91.5)
however if
A3 = 91.5
A4 = 5.0

the answer should be 86.5 (91.5 - 5.0 = 86.5)

The formula should be in one formula, so if a cell is negative value should sum to the upper cell and if positive value should be deducted to upper cell
Hoping somebody to help me to get the right formula... Thank you un advance
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
=A1-A2 should give you the answers you wanted
 
Upvote 0
=SUM(ABS(A1:A2))
This formula works to get the sum of negative number with positive number, but i need to incorporate with another formula if the number is positive should be subtracting from the upper cell.
 
Upvote 0
Did you actually try his suggestion? If so, what result did you get & what result did you expect?

This is using his suggestion
Code:
[TABLE="width: 174"]
<colgroup><col width="87" span="2" style="width: 65pt;"></colgroup><tbody>[TR]
[TD="width: 87, align: right"]87.5[/TD]
[TD="width: 87, align: right"]91.5[/TD]
[/TR]
[TR]
[TD="align: right"]-4[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]91.5[/TD]
[TD="align: right"]86.5[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
Hi Gaz,

I tried and got the correct answer... i didn't realize that i'm doing the opposite, that's why i'm getting incorrect result. apologized for that!

Thanks and apologized Alan... didn't realized... Thank's Gaz for enlightenment.. :)
 
Upvote 0
Hi Gaz,

I tried and got the correct answer... i didn't realize that i'm doing the opposite, that's why i'm getting incorrect result. apologized for that!

Thanks and apologized Alan... didn't realized... Thank's Gaz for enlightenment.. :)

glad that you got it sorted
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,188
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top