ExcelFormulas logoExcelFormulas.
AIに聞く
検索/行列QA検証済み

XLOOKUP.

範囲または配列を検索し、対応する2つ目の範囲または配列から一致する項目を返します。

検索/行列
ExcelExcel 365Excel 2021Google Sheets

仕組みと動作原理

XLOOKUP関数はExcel業務を効率化する代表的な関数です。範囲または配列を検索し、対応する2つ目の範囲または配列から一致する項目を返します。 複雑な集計や参照処理を簡素化し、データ分析の精度と生産性を飛躍的に高めます。

💡 わかりやすい要約

Searches for a value in one list (lookup array) and returns matching information from another list (return array) in the exact same row.

日常のたとえ

"Think of XLOOKUP like looking up a word in a dictionary. You have a search word (Employee ID), you scan the dictionary list (ID Column), and you get the corresponding definition (Department Column)."

構文.

標準Excel表記法
=XLOOKUP(検索値, 検索配列, 戻り配列, [見つからない場合], [一致モード])
ヒント: カッコの中の [角カッコ] で囲まれた引数は省略可能です。その他の引数は必須です。

引数一覧.

この関数で指定できるすべての引数について詳しく解説します。

lookup_value必須

The value you want to search for.

指定例: D2
lookup_array必須

The range or array to search in.

指定例: A2:A6
return_array必須

The range or array to return values from.

指定例: B2:B6
if_not_found省略可

Text or value to return if no match is found.

初期値: "Not Found"
match_mode省略可

0 = Exact match (default), -1 = Exact or next smaller, 1 = Exact or next larger, 2 = Wildcard match.

初期値: 0
search_mode省略可

1 = Search first-to-last (default), -1 = Search last-to-first, 2 = Binary search (sorted asc), -2 = Binary search (sorted desc).

初期値: 1

具体的な計算例

ステップ別の実務シナリオ

Department Directory Lookup

Retrieve an employee's Department by searching their Employee ID.

Emp IDDepartmentSalarySearch IDResult Dept
101Engineering105000103—
102Marketing88000——
103Sales95000——
適用する数式
=XLOOKUP(D2, A2:A6, B2:B6, "Not Found")
期待される結果::Sales

Evaluates XLOOKUP over the sample table cells, placing the verified output in cell E2.

数式ジェネレーター

ウィザードを開く

引数を入力するだけで、シートにそのまま貼り付けて使える数式を作成できます。

Generated Formulaコピー準備完了

出力される値の特性

Returns "Sales" based on sample evaluation criteria and active cell references.

出力サンプル::Sales
戻り値の型::Text

実務上のベストプラクティス

  • Use XLOOKUP to return multiple items simultaneously by selecting a multi-column return range.
  • Unlike VLOOKUP, XLOOKUP does not break when columns are inserted or deleted in the spreadsheet.
  • Leave match_mode blank if you want an exact match, which is what is needed 95% of the time.

よくあるミスと注意点

  • XLOOKUP is only available in Excel 365, Excel 2021, and Excel for the Web. It will return a #NAME? error in older versions.
  • Ensure the lookup_array and return_array are of equal length; otherwise, XLOOKUP returns a #VALUE! error.
互換性情報

各プラットフォーム対応表

実際のExcelおよびGoogleスプレッドシートの計算エンジン仕様に基づいた検証結果です。

Excel✓
対応
Excel 365✓
対応
Excel 2021✓
対応
Excel 2019✕
非対応
Google Sheets✓
対応
Excelバージョン対応履歴

Introduced in Excel 365 and Excel 2021. Not supported in Excel 2019 or Excel 2016 (#NAME? error).

Googleスプレッドシート対応状況

Fully supported in Google Sheets with identical parameters, default exact match, and search modes.

よくある質問と回答

技術解説
Can XLOOKUP look up values to the left?↓

Yes. Unlike VLOOKUP which requires the return column to be to the right of the lookup column, XLOOKUP uses separate lookup_array and return_array ranges, allowing you to return data located in any column or row.

What is the primary difference between XLOOKUP and VLOOKUP?↓

XLOOKUP defaults to an exact match (VLOOKUP defaults to approximate match), does not break when columns are inserted into the table, handles missing values gracefully with the if_not_found parameter, and supports both vertical and horizontal searches.

Why does XLOOKUP return a #VALUE! error?↓

The #VALUE! error in XLOOKUP happens when lookup_array and return_array have incompatible dimensions (for example, a 5-row lookup range paired with an 8-row return range). Ensure both arrays cover the exact same number of rows or columns.