absolute value

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
150
Office Version
  1. 2013
Platform
  1. Windows
Cell A1 has the initial rate ( a number with 2 decimals places like say 2.38 )
Cell B1 also has the initial rate ( a number with 2 decimals places like say 2.38 )
Cell C1 also has the initial rate ( a number with 2 decimals places like say 2.38 )
Now cell D1 is (A1-B1)xC1

I want the answer to be zero if the result of (A1-B1)xC1 is A positive number and
IF (A1-B1)xC1 is a negative number I want it to display without the minus sign ie as a positive number
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
What do you want if (A1-B1)*C1 is zero (since zero is neither positive nor negative).

IF((A1-B1)*C1<0,ABS((A1-B1)*C1),0)
 
Upvote 0
IF A1:C1 all equal 0 and C1*(A1-B1)=0, ABS(MIN(C1*(A1-B1),0)) also returns 0
Similarly if A1 = 5, B1 = 5 and C1 = -5, ABS(MIN(C1*(A1-B1),0)) returns 0

My guess is ABS returns a number and since 0 is the ceiling provided, whether answer of 0 is positive or negative becomes moot?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

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