メインコンテンツへスキップ

Excelで最も近いまたは最も近い値(数値またはテキスト文字列)を見つける方法は?

列に数値のリストがあり、数値のリストから特定の値に最も近い値または最も近い値を見つける必要があるとします。 どのように対処しますか? 実際には、次の手順でExcelで最も近い値または最も近い値を見つけることができます。

配列数式で最も近いまたは最も近い数を見つける

たとえば、列Aに数値のリストがあり、列Aから最も近い値または最も近い18の値を見つけることができます。次のように実行できます。

空白のセルを選択し、以下の数式を入力して、 Ctrl + Shift + Enter 一緒にキー。

=INDEX(B3:B22,MATCH(MIN(ABS(B3:B22-E2)),ABS(B3:B22-E2),0))

注: この配列式では {=INDEX(B3:B22,MATCH(MIN(ABS(B3:B22-E2)),ABS(B3:B22-E2),0))},

  • B3:B22 特定の値を見つけたい範囲です
  • E2 比較したい検索値です。
ノートリボン 数式は複雑すぎて覚えられませんか? 数式を定型句として保存して、後でワンクリックで再利用できるようにします。
続きを読む...     無料体験

Kutools for Excelを使用して、指定された値の偏差範囲内のすべての最も近い数値を簡単に選択できます

場合によっては、範囲内の指定された値に対するすべてのクローゼット値を見つけて選択したいことがあります。 実際には、偏差値を定義してから、Kutools forExcelを適用できます。 特殊セルを選択 与えられた値の除算範囲内のすべての最も近い値を簡単に見つけて選択するためのユーティリティ。

Kutools for Excel-Excel用の300以上の便利なツールが含まれています。 60日間のフル機能の無料トライアル、クレジットカードは必要ありません! 今すぐ入手

たとえば、この例では、偏差値を2と定義し、指定された値は18です。したがって、次の間の値を見つけて選択する必要があります。 16 (= 18-2)と 20 (= 18 + 2)。 次の手順をご覧ください。

1。 与えられた値に最も近い値を検索する範囲を選択し、をクリックします クツール > 選択 > 特定のセルを選択.

2. [特定のセルを選択]ダイアログボックスを開いて、
(1)確認してください セル 内のオプション 選択タイプ セクション;
で(2) 特定のタイプ セクションで、最初のドロップダウンリストをクリックして選択します 以上 それからタイプ 16 次のボックスに入力し、 以下 XNUMX番目のドロップダウンリストから入力して 20 次のボックスに。 左のスクリーンショットを参照してください:

3。 クリック Ok このユーティリティを適用するボタン。 次に、ダイアログボックスが表示され、選択されたセルの数が表示されます。 そして、以下のスクリーンショットのように、指定された値の偏差範囲内で最も近いすべての値が選択されていることがわかります。


便利なツールを使用して、最も近いまたは最も近いテキスト文字列を検索します

Kutools for Excelがインストールされている場合は、そのファジー検索機能を適用して、Excelで特定の範囲から最も近いテキスト文字列を簡単に見つけることができます。 次のようにしてください。

Kutools for Excel-Excel用の300以上の便利なツールが含まれています。 60日間のフル機能の無料トライアル、クレジットカードは必要ありません! 今すぐ入手

1に設定します。 OK をクリックします。 クツール > もう完成させ、ワークスペースに掲示しましたか? > ファジールックアップ ブックでファジールックアップペインを有効にします。

2。 ファジールックアップペインで、次のように構成してください。
(1)確認してください 指定の オプションを選択し、最も近いテキスト文字列を検索する範囲を選択します。
(2)確認してください 指定されたテキストで検索 オプション;
(3)に移動します テキスト ボックスに入力し、最も近いテキスト文字列が見つかる指定されたテキストを入力します。
で(4) 異なる文字の最大数 ボックスに番号を入力してください。 私の場合、1と入力します。
(5)In セル文字列の長さは少なくとも ボックスに番号を入力してください。 私の場合、5と入力します。

3。 クリック もう完成させ、ワークスペースに掲示しましたか?

検索結果を展開すると、最も近いすべてのテキスト文字列がまとめて一覧表示されます。 スクリーンショットを参照してください:


デモ:指定された値の偏差範囲で最も近い値をすべて選択します

Kutools for Excel: 300 を超える便利なツールをすぐに利用できます。 機能制限なしの 30 日間の無料トライアルを今すぐ始めてください。 今すぐダウンロード!

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (42)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How do we do this if our data is filtered?
This comment was minimized by the moderator on the site
copy the filtered data to a new sheet
This comment was minimized by the moderator on the site
Using the formula how would you return the value next to 17 if there was another column next to number like names. So if 17 is the closest in rang the name next to 17 (John) would be returned?


Example: 18 is nearest to 17 so the return value would be John


Numbers Names
38 Tammy
17 John
20 Amy
This comment was minimized by the moderator on the site
You can use the Approximate match of VLOOKUP function to solve this problem.
=VLOOKUP(E2,A1:B15,2,TRUE)
This comment was minimized by the moderator on the site
I used this formula =INDEX(B3:B22,MATCH(MIN(ABS(B3:B22-E2)),ABS(B3:B22-E2),0)) and it works great. However i have found that where the source number is exactly between two numbers in the range, the lower range number is selected to be the closest.

eg: Searching for the closest number to 9 in the range: 6, 8, 10, 12. It will chose 8 instead of 10. Rounding convention is to round up if exactly half way between. Is there a workaround? Thanks.
This comment was minimized by the moderator on the site
ITS NOT WORKING its #N/A somehow
This comment was minimized by the moderator on the site
Hi DAKOT,
=INDEX(A1:A20,MATCH(MIN(ABS(A1:A20-D1)),ABS(A1:A20-D1),0)) is an array formula, after entering it, please remember to press the Ctrl + Shift + Enter keys together.
This comment was minimized by the moderator on the site
Hi,
im using that formula in finding closest date, it is working.but i want to add condition: closest date that is less than 30 days of the current date (today).it is possible?
Anyone can help please?thank you
This comment was minimized by the moderator on the site
Hi farolito,
How about changing the value you will compare with to =TODAY() in Cell D1?
This comment was minimized by the moderator on the site
Hi, I can get it to work, amazing, BUT not when I input '1' as my 'match_type', instead of the '0' that you used. I want to return values less than or equal to, not just closest to +/-. If I enter 1 instead of 0, it doesn't work. Thoughts on why this might be?
This comment was minimized by the moderator on the site
Great formula -thank you-just a quick question. Anyone know how to highlight the cell that is closest in the match so in long lists it is easy to find??
This comment was minimized by the moderator on the site
If you have the row number from the formula above then you could set a conditional formatting rule on the search array to highlight a cell if it lies on that row.
This comment was minimized by the moderator on the site
It does not work for me! Excel says that there is an error :(
This comment was minimized by the moderator on the site
My bad This will look for all nearest date to today in column d =LARGE(D:D,COUNTIF(d:D,">="&TODAY())) http://WWW.excelireland.com
This comment was minimized by the moderator on the site
Hi, I tried the above formula. however, it is giving me a #N/A. 1. Copy pasted the range from A2 to A43. 2. Formula given was : =INDEX(A2:A43,MATCH(MIN(ABS(A2:A43-H1)),ABS(A2:A43-H1),0)) 3. Press control +Shift +enter Can anybody help me as to what wrong I am doing. :(
This comment was minimized by the moderator on the site
Replace the " , " separator for " ; "
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations