How to find the closest value in a range to a given lookup value?

katmarsar

New Member
Joined
Apr 17, 2012
Messages
12
Is there a function or combination of functions that finds the exact or closest value in a range of values when the range of values is compared to a given lookup value given the following constraints.

1. The range of values is unsorted.
2. The range of values may contain zero values.

Thanks
 
I am looking for something similar. I need a combination of finding the lowest value with criteria applied. I basically need to combine the function of finding the lowest value while filtering to two criteria. Any ideas?

The formula below can identify the max of the available criteria, but I need the formula to identify the value closest to zero.

=MAX(IF(SUBTOTAL(2,OFFSET(G2,ROW(G2:G300000)-ROW(G2),0)),IF(B2:B300000='Overview #2'!C6,IF(E2:E300000='Overview #2'!B14,G2:G300000))))
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Not working properly

changing the lookup value doesn't make any changes in results, even if i delete the same or if there is no value in lookup cell

any solutions??????????
 
Upvote 0
It is an array function, so make sure you are confirming with CTRL+SHIFT+ENTER after typing the formula.
If that isn't the problem, can you please post exactly what formula you are using.

In general, you probably should create a new thread so that the most possible people can view your questions. Not all users from 4 years ago are still active.
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,344
Members
452,638
Latest member
Oluwabukunmi

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