Excel Performance Problems

How to Optimize XLOOKUP Performance in Large Excel Workbooks

Chanuka GeekiyanageChanuka Geekiyanage Nov 10, 2026 869 views

Question details

The user wants to improve calculation speeds and optimize overall performance when using XLOOKUP formulas in large Excel workbooks, particularly with massive tables or external data.

How to Optimize XLOOKUP Performance in Large Excel Workbooks
Product
Excel
Device & OS
not provided
Scenario
Working with large datasets where multiple XLOOKUP calculations cause significant slowdowns, lags, or freezing.
Observed behavior
Excel becomes slow to calculate, unresponsive, or freezes due to the heavy computational load of numerous or complex XLOOKUP formulas referencing large tables.
Before you start

Before making structural changes to your formulas, ensure your Excel workbook is set to Manual Calculation mode (Formulas > Calculation Options > Manual) to prevent Excel from freezing while you edit the formulas.

Solution 1Recommended

Use XLOOKUP's Binary Search Mode

Switching from the default linear search to binary search can drastically reduce calculation times for large datasets, provided the lookup array is sorted.

By default, XLOOKUP searches row by row (linear search). If your dataset is large, this is extremely slow. A binary search splits the dataset in half repeatedly to find the value, which is exponentially faster but requires the data to be sorted.

1
Sort your lookup data

Select your lookup table and sort it by the key column (the column you are searching in) in ascending order.

2
Modify the XLOOKUP formula

Navigate to the cell containing your XLOOKUP formula.

3
Set the search_mode argument

Update the formula to include the 6th argument for search mode. Enter a formula like =XLOOKUP(A2, LookupTable[Key], LookupTable[Value], "", 0, 2). The '2' specifies a binary search for data sorted in ascending order.

Use XLOOKUP's Binary Search Mode
Performance Boost: Using binary search mode on a sorted dataset can make your lookups process almost instantly compared to a standard linear search.
Efficient Spreadsheet Alternative

Process Large Datasets Smoothly with WPS Spreadsheet

WPS Office provides a highly optimized Spreadsheet application that fully supports modern functions like XLOOKUP and dynamic arrays. It is designed to handle large datasets efficiently while maintaining 100% compatibility with Microsoft Excel files.

  1. 1. Install the software: Download and install WPS Office on your PC or Mac.
  2. 2. Open your large dataset: Launch WPS Spreadsheet and open your large .xlsx file containing the lookup data.
  3. 3. Apply XLOOKUP formulas: Use =XLOOKUP() exactly as you would in Excel, leveraging WPS's fast calculation engine.
  4. 4. Save your work: Save your optimized workbook seamlessly in the standard Excel format without compatibility issues.
Fully compatible with Microsoft Excel (.xlsx, .xls, .csv) formats and formulas.Natively supports advanced functions including XLOOKUP and dynamic array formulas.Lightweight architecture ensures faster loading and calculation times for large workbooks.Free to download and use with a highly familiar user interface that requires no learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why is XLOOKUP making my Excel workbook so slow?

By default, XLOOKUP performs a linear search, checking every row from top to bottom. If you have hundreds of thousands of rows or are referencing full columns (like A:A), this requires massive computational power and memory, resulting in slow performance.

Can sorting my data really speed up XLOOKUP?

Yes. If you sort your lookup array and change the XLOOKUP search_mode argument to 2 (binary search ascending) or -2 (binary search descending), Excel splits the data in halves rather than checking row by row. This finds the match exponentially faster.

Is Power Query faster than XLOOKUP for merging tables?

For very large datasets (e.g., over 100,000 rows), Power Query is generally much faster and more stable than using thousands of XLOOKUP formulas. It processes the merge in the background and only outputs the final values, drastically reducing the active calculation load in your workbook.

Should I avoid using full column references with XLOOKUP?

Yes, avoiding full column references (like A:A or B:B) is highly recommended. Even though modern Excel handles empty cells better than older versions, full column references still force the engine to process a larger range than necessary. Always use exact table ranges or Excel Tables (ListObjects) instead.