Excel formula to look up the closest number in a range
top of page

Excel formula to look up the closest number in a range

You can use an array formula posted here, to find the number which is closest in a range to a given value.


=INDEX(DesignationNumber,MATCH(MIN(ABS(Plaintiff-E2)),ABS(Plaintiff-E2),0))


Be sure to press CTRL + SHIFT + ENTER when inputting this formula.

ree


In this example, the formula searches for the values in cell E2, the range from B2:B8, and returns the corresponding number listed in A2:A8. The formula works with named ranges. You can set up a named range under Formulas . . . Name Manager:



ree

When setting the named ranges for the formula, select only the numbers in the ranges, not the column headings, or the formula will not work.


The value returned is that in the named range entered after the INDEX part of the formula. The range to search in is that named after MATCH in the two ABS parts which return an absolute value of a calculation - the number not accounting for whether it is positive or negative.



ree

Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page