ZRS
ZRS

Reputation: 23

Excel formula to find the nearest values

Is it possible to find the nearest value (+or-) with formula and display the 1st row value & 1st column value in my linked excel table?

Eg:

Search Value is "7,30" (C12; variable can ask for any value on table)

Found row value is "7" (E12 with formula; adressed to A7)

Found column value "4,00%" (E13 with formula; adressed to E1)

"F12" Formula is OK. What can be the formula in "F13" regarding the information on table below?

<head>
<meta http-equiv=Content-Type content="text/html; charset=Windows-1254">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 14">
<link rel=File-List href="SampleT_dosyalar/filelist.xml">
<style id="table-3_9841_Styles">
<!--table
	{mso-displayed-decimal-separator:"\,";
	mso-displayed-thousand-separator:"\.";}
.xl159841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl659841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl669841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border:.5pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl679841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:Fixed;
	text-align:general;
	vertical-align:bottom;
	border:.5pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl689841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:"0\.00\\%";
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl699841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	background:#FFC000;
	mso-pattern:black none;
	white-space:nowrap;}
.xl709841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:"0\.00\\%";
	text-align:general;
	vertical-align:bottom;
	background:#FFC000;
	mso-pattern:black none;
	white-space:nowrap;}
.xl719841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:"0\.00\\%";
	text-align:general;
	vertical-align:bottom;
	border:.5pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl729841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:left;
	vertical-align:top;
	border:none;
	mso-diagonal-up:.5pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:normal;}
.xl739841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:red;
	font-size:11.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl749841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:#0070C0;
	font-size:11.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl759841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl769841
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:162;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	background:#D9D9D9;
	mso-pattern:black none;
	white-space:nowrap;}
-->
</style>
</head>

<body>
<!--[if !excel]>&nbsp;&nbsp;<![endif]-->
<!--Aşağıdaki bilgiler Microsoft Excel'in Web Sayfası Olarak Yayımlama
sihirbazı tarafından oluşturuldu.-->
<!--Aynı öğe Excel'den yeniden yayımlanırsa, DIV etiketleri arasındaki
bilgilerin tümü değiştirilecek.-->
<!----------------------------->
<!--EXCEL WEB SAYFASI OLARAK YAYIMLA SİHİRBAZI ÇIKTI BAŞLANGICI-->
<!----------------------------->

<div id="table-3_9841" align=center x:publishsource="Excel">

<table border=0 cellpadding=0 cellspacing=0 width=1114 style='border-collapse:
 collapse;table-layout:fixed;width:836pt'>
 <col class=xl159841 width=26 style='mso-width-source:userset;mso-width-alt:
 950;width:20pt'>
 <col class=xl159841 width=64 style='width:48pt'>
 <col width=64 span=16 style='width:48pt'>
 <tr class=xl159841 height=20 style='height:15.0pt'>
  <td height=20 class=xl769841 width=26 style='height:15.0pt;width:20pt'>&nbsp;</td>
  <td class=xl759841 width=64 style='width:48pt'>A</td>
  <td class=xl759841 width=64 style='width:48pt'>B</td>
  <td class=xl759841 width=64 style='width:48pt'>C</td>
  <td class=xl759841 width=64 style='width:48pt'>D</td>
  <td class=xl759841 width=64 style='width:48pt'>E</td>
  <td class=xl759841 width=64 style='width:48pt'>F</td>
  <td class=xl759841 width=64 style='width:48pt'>H</td>
  <td class=xl759841 width=64 style='width:48pt'>I</td>
  <td class=xl759841 width=64 style='width:48pt'>J</td>
  <td class=xl759841 width=64 style='width:48pt'>K</td>
  <td class=xl759841 width=64 style='width:48pt'>L</td>
  <td class=xl759841 width=64 style='width:48pt'>M</td>
  <td class=xl759841 width=64 style='width:48pt'>N</td>
  <td class=xl759841 width=64 style='width:48pt'>O</td>
  <td class=xl759841 width=64 style='width:48pt'>P</td>
  <td class=xl759841 width=64 style='width:48pt'>Q</td>
  <td class=xl759841 width=64 style='width:48pt'>R</td>
 </tr>
 <tr height=20 style='mso-height-source:userset;height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>1</td>
  <td rowspan=2 class=xl729841 width=64 style='width:48pt'><span
  style='mso-spacerun:yes'>  </span>%<br>
    <span style='mso-spacerun:yes'>        </span>Price</td>
  <td class=xl689841 align=right>1,00%</td>
  <td class=xl689841 align=right>2,00%</td>
  <td class=xl689841 align=right>3,00%</td>
  <td class=xl709841 align=right>4,00%</td>
  <td class=xl689841 align=right>5,00%</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>2</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>3</td>
  <td class=xl159841 align=right>3</td>
  <td class=xl159841 align=right><a name="RANGE!C4:G11">3,03</a></td>
  <td class=xl159841 align=right>3,06</td>
  <td class=xl159841 align=right>3,095</td>
  <td class=xl159841 align=right>3,125</td>
  <td class=xl159841 align=right>3,16</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>4</td>
  <td class=xl159841 align=right>4</td>
  <td class=xl159841 align=right>4,04</td>
  <td class=xl159841 align=right>4,08</td>
  <td class=xl159841 align=right>4,125</td>
  <td class=xl159841 align=right>4,165</td>
  <td class=xl159841 align=right>4,21</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>5</td>
  <td class=xl159841 align=right>5</td>
  <td class=xl159841 align=right>5,05</td>
  <td class=xl159841 align=right>5,1</td>
  <td class=xl159841 align=right>5,155</td>
  <td class=xl159841 align=right>5,21</td>
  <td class=xl159841 align=right>5,265</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>6</td>
  <td class=xl159841 align=right>6</td>
  <td class=xl159841 align=right>6,06</td>
  <td class=xl159841 align=right>6,12</td>
  <td class=xl159841 align=right>6,185</td>
  <td class=xl159841 align=right>6,25</td>
  <td class=xl739841 align=right>7,29</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>7</td>
  <td class=xl699841 align=right>7</td>
  <td class=xl159841 align=right>7,07</td>
  <td class=xl159841 align=right>7,145</td>
  <td class=xl159841 align=right>7,215</td>
  <td class=xl739841 align=right>7,29</td>
  <td class=xl159841 align=right>7,37</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>8</td>
  <td class=xl159841 align=right>8</td>
  <td class=xl159841 align=right>8,08</td>
  <td class=xl159841 align=right>8,165</td>
  <td class=xl159841 align=right>8,245</td>
  <td class=xl159841 align=right>8,335</td>
  <td class=xl159841 align=right>8,42</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>9</td>
  <td class=xl159841 align=right>9</td>
  <td class=xl159841 align=right>9,09</td>
  <td class=xl159841 align=right>9,185</td>
  <td class=xl159841 align=right>9,28</td>
  <td class=xl159841 align=right>9,375</td>
  <td class=xl159841 align=right>9,475</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>10</td>
  <td class=xl159841 align=right>10</td>
  <td class=xl159841 align=right>10,1</td>
  <td class=xl159841 align=right>10,205</td>
  <td class=xl159841 align=right>10,31</td>
  <td class=xl159841 align=right>10,415</td>
  <td class=xl159841 align=right>10,525</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>11</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>12</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl659841>Search:</td>
  <td class=xl679841 align=right>7,30</td>
  <td class=xl659841>Row</td>
  <td class=xl669841 align=right>7</td>
  <td class=xl159841 colspan=11><span style='mso-spacerun:yes'> 
  </span>=İNDİS($A:$A;MAK((MİN(MUTLAK(DataRange-$C$12))=MUTLAK(DataRange-$C$12))*SATIR(DataRange)))</td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>13</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl659841>Column</td>
  <td class=xl719841 align=right style='border-top:none'>5,00%</td>
  <td class=xl159841 colspan=11><span style='mso-spacerun:yes'> 
  </span>=İNDİS($1:$1;1;MAK((MİN(MUTLAK(DataRange-$C$12))=MUTLAK(DataRange-$C$12))*SÜTUN(DataRange)))</td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>14</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>15</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl749841 colspan=10>This formula is OK as row# &quot;7&quot; but is
  it possible to display &quot;E7&quot; instead of &quot;F6&quot; as column
  title?</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>16</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl749841 colspan=12>Can the formula check row# first to retrieve
  the colum title then check for others if no figure is identical in row
  &quot;7&quot; line?</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl759841 style='height:15.0pt'>18</td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
  <td class=xl159841></td>
 </tr>
 <![if supportMisalignedColumns]>
 <tr height=0 style='display:none'>
  <td width=26 style='width:20pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
 </tr>
 <![endif]>
</table>

</div>


<!----------------------------->
<!--EXCEL WEB SAYFASI OLARAK YAYIMLA SİHİRBAZI ÇIKTI SONU-->
<!----------------------------->
</body>

</html>

Upvotes: 0

Views: 148

Answers (3)

Ron Rosenfeld
Ron Rosenfeld

Reputation: 60224

These formulas must be array-entered:

Row:  =INDEX($A:$A,MAX((MIN(ABS(DataRange-$C$12))=ABS(DataRange-$C$12))*ROW(DataRange)))

Column:  =INDEX($1:$1,1,MAX((MIN(ABS(DataRange-$C$12))=ABS(DataRange-$C$12))*COLUMN(DataRange)))

EDIT: If there is a possibility of duplicates in the table (two values that are equidistant from the search value, then the following formula will ensure that Column comes from the same row as the row value found.

Row:  Formula in C12
Column:  =INDEX($1:$1,1,MAX((MIN(ABS(INDEX(DataRange,E12-ROW(DataRange)+1,0)-$C$12))=ABS(INDEX(DataRange,E12-ROW(DataRange)+1,0)-$C$12))*COLUMN(DataRange)))

In your example,

DataRange refers to:    =Sheet1!$B$3:$F$10

To array-enter a formula, after entering the formula into the cell or formula bar, hold down ctrl+shift while hitting enter. If you did this correctly, Excel will place braces {...} around the formula.

Upvotes: 0

MGP
MGP

Reputation: 2551

I guess there must be a prettier answer to this, but this worked for me: In E12 put this:

=ROUNDDOWN(C12,0)

And in E13 put this Array-Formula (need to be entered with Ctrl+Shift+Enter instead of the usual Enter):

=MATCH(MIN(ABS(C12-B3:F10)),ABS(C12-INDIRECT(CONCATENATE("B",E12)):INDIRECT(CONCATENATE("F",E12))),0)

Hope this helps

Upvotes: 1

Scott Craner
Scott Craner

Reputation: 152505

In E12, the row:

=INDEX(A:A,AGGREGATE(15,6,($B$3:$F$10)/(AGGREGATE(15,6,ABS(C12-$B$3:$F$10),1)=ABS(C12-$B$3:$F$10)),1))

In E13, the column:

=INDEX(1:1,AGGREGATE(15,6,COLUMN($B$3:$F$10)/(AGGREGATE(15,6,ABS(C12-$B$3:$F$10),1)=ABS(C12-$B$3:$F$10)),1))

enter image description here

Upvotes: 0

Related Questions