excel - Matching a cell to the closest highest value in another range -
i have number on "buildup" tab of excel workbook , list of random numbers on "oh" tab of same workbook. trying match number on buildup tab closest highest value on oh
tab. found formula online , tweaked cell references , sheet names, seems match closest number , not highest closest number:
=index(oh!$b$2:$b$250,match(min(abs(buildup!ac8-oh!$b$2:$b$250)),abs(buildup!ac8-oh!$b$2:$b$250),0))
oh
sheet list of random numbers. buildup!ac8
cell reference of number i'd match closest highest value on oh
tab.
i use array formula small
or min
function, entered ctrl + shift + enter:
using small
:
=small(if(oh!$b$2:$b$250>=buildup!ac8,oh!$b$2:$b$250),1)
using can increment 2nd highest, 3rd highest, etc. based on second parameter. return #num!
if no match found.
using min
:
=min(if(oh!$b$2:$b$250>=buildup!ac8,oh!$b$2:$b$250))
as @byron pointed out, will return 0 when there no large number match, small
might preferred.
Comments
Post a Comment