Finding closest match

Kritty

New Member
Joined
Feb 18, 2019
Messages
4
Hi,

I'm having a bit of trouble writing a formula to help find the nearest match.

My search up value is 185. I would like to write a formula that will read the list of numbers below, and provide the nearest approximate match.

I have tried using both VLOOKUP and INDEX functions but I cannot seem to get it to work.

For some reason if I try either of those functions, it will always return the lowest value from the numbers below (-137.55) regardless of my "search up" value.

It's probably something basic I am missing but any help would be appreciated.

Thanks :)

300.01
268.91
238.56
208.94
180.03
151.81
124.24
97.33
71.04
45.35
0
-4.27
-28.13
-51.29
-73.79
095.64
-116.89
-137.55
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi Kritty,

Alternatively, if you cannot sort the data for some reason, try using a combination of INDEX and SUMPRODUCT array formula (ctrl+shift+enter):

Code:
=INDEX(A:A,SUMPRODUCT(--(ABS($A$1:$A$18-$C$5)=SMALL(ABS($A$1:$A$18-$C$5),1)),ROW($A$1:$A$18)))

I am assuming that your data is in cells A1:A18 and your lookup value is in cell C5 (e.g. 185).
 
Upvote 0

Forum statistics

Threads
1,215,389
Messages
6,124,665
Members
449,178
Latest member
Emilou

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