Two columns, locate the minus figure and calculate

AugustusHaynes

New Member
Joined
Nov 5, 2013
Messages
46
Hello,


Hopefully I'm explaining this well.


So I've got 2 columns, or 2 cells as the example. One would have -1.5 and the other 1.5, I need to use a formula that will identify which one is the minus figure (could be in either column/cell) and then compare that minus figure to another cell. So in my example, it would identify -1.5 as the minus and then compare it to say -.0.8 and produce a result of -0.7. Ideally it would work both ways though, so if the other cell was +2.1 it would produce a result of 3.6 as the difference.




Thanks very much.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about


Excel 2013 32 bit
ABCD
21.5-1.5-0.80.7
31.5-1.52.13.6
Sheet1
Cell Formulas
RangeFormula
D2=IF(A2A2),IF(B2))
 
Upvote 0
Does this work?
Produces same results as Fluffs output

=ABS(MIN(A2,B2)-C2)
 
Last edited:
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0
let me know if I should start a new thread. But this is the same sheet.

The final part of the sheet needs a total for a column where it only counts figures that are either over 2.5 or under -2.5

=COUNTIFS(W2:W17,2.5<W2:W17>-2.5)

Comes back as 0 no matter which why I have the signs or where I play the minus figure. Can't seem to get a sumif & sumif to work but assume that's what sumifs is for.

Thanks in advance.
 
Upvote 0
Hi,

Try this:


Book1
WXY
224
33
44
51
6-1
7-2
8-3
9-4
Sheet239
Cell Formulas
RangeFormula
Y2=SUM(COUNTIF(W2:W17,{">2.5","<-2.5"}))
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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