If function greater than, less than, with positive and negative numbers

mkikas

New Member
Joined
Feb 4, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
  2. Web
I look, but i didn't found an answer for these. I need a formula, that will give me a value between two cells, where one is allways negative, the other positive, and the result should be always negative but the value will be one or the other one. I am using the formula =IF(B2>B3,B3,B2), the issue is that B2 is a negative number and B3 a positive, and formula allways return me B2. Bellow, i give the examples, of what i need to happened in just one column. so, in the column B (Formula) is where i put the formula, that is not working, in columns C (Ex:1) and D (Ex:2), is what i need to happens when i insert the formula.

FormulaEx:1Ex:2
Capex to be Recovered
-170​
-170​
-40​
Capex allowed to recover in the Month
50​
50​
50​
Capex recovered in the month
-170​
-50​
-40​

Thanks in advance for your support.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I am sorry, i made a mistake, the value in the last row (Capex recovered in the month) should be always positive, and not negative, so the table should be:


FormulaEx:1Ex:2
Capex to be Recovered-170-170-40
Capex allowed to recover in the Month505050
Capex recovered in the month1705040
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

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