Comparing Numbers + closest match

franky1987

New member
Joined
Nov 16, 2011
Messages
2
Reaction score
0
Points
0
Hello everyone,

Can anyone help me with a formula that will use a range of cells and compare them.

I have 2 columns of cells filled with ascending and descending positive and negative

numbers.
------------------
Example
------------------
56 120
58.4 118
60 116
65 112.3
70 108.56
72 106
... ...
... ...
92 90
... ...
... ...
197 2
200 0
202 -2
... ...
... ...

-------------------
I would like the formula to search these 2 columns for the closest matches, which are 92
and 90 and highlight them or bring them to a different cell.

Further, I would like a formula that will give me the highest positive with the lowest
positive i.e. 200 and 0

the other two columns are exatcly the same but the ascending and descending order is
reversed.

Thanks a lot in advance guys :)

franky
 
You could do the highlighting with conditional formatting based on a formula:
=ABS($A1-$B1)=MIN(ABS($A$1:$A$14-$B$1:$B$14))
adjusting ranges to suit.


Just noticed - cross-posted here.
 
Last edited:
thanks for that mate.

honestly, i didn't know in which forum to post. sorry for braking the rules

I will try that, thanks again
 
Hi Franky,

Doesn't really matter which forum you pick, but you should try to pick one... especially if you get an answer in 16 minutes.

You may want to have a read of This article
 
Back
Top