Making VLookup Function Use Cell Value: Table Array Reference in Another Sheet

Abstract: Resolve VLOOKUP errors by using INDIRECT to dynamically reference table arrays from other sheets based on cell values.

Created: 2026-09-26 by
To make the VLOOKUP function use a cell value from another sheet as part of its table array reference, you must construct a dynamic range using the INDIRECT function or by explicitly referencing the other sheet's name in the range address. This approach allows the lookup range to adapt based on a stored identifier, such as a month name or department code, located in a specific cell. By combining these elements, you can create flexible formulas that automatically adjust their search boundaries without manual editing.

Understanding the Standard Table Array Limitation

The standard VLOOKUP syntax requires the table_array argument to be a static range, typically formatted like Sheet1!A:B or A1:C100. When you attempt to insert a cell reference directly into this part of the formula—for example, trying to replace A:B with a cell containing the text "A:B"—Excel treats it as invalid syntax because the function expects a range object, not a string. This limitation is common when users want to switch between different data tables dynamically based on user input.

Solution 1: Using the INDIRECT Function

The most robust method for creating a dynamic table array is the INDIRECT function. This function takes a text string and converts it into a valid cell reference. If you have a cell, say E1, that contains the text representation of a range (e.g., "Data!A2:D100"), you can wrap your range reference in INDIRECT.

Consider a scenario where you have a dropdown menu in cell G1 that selects a sheet name, such as "January" or "February". Your data resides on sheets named accordingly. To look up a value from the sheet selected in G1, you would structure your formula as follows:

=VLOOKUP(lookup_value, INDIRECT("'"&G1&"'!A:D"), col_index_num, [range_lookup])

In this formula, the concatenation operator & builds the full text string required by INDIRECT. The single quotes around G1 handle sheet names that contain spaces. The resulting range passed to VLOOKUP becomes a live reference to columns A through D on the sheet specified in G1. This ensures that if you change the selection in G1, the entire lookup operation shifts to the new dataset instantly.

Solution 2: Referencing Another Sheet Directly

If your requirement is simply to pull data from a fixed location on a different sheet rather than a dynamic one, you do not need INDIRECT. You can explicitly define the sheet name within the range argument. For instance, if your lookup value is in A2 and the source data is on a sheet named "ReferenceData" in columns A and B, the formula is straightforward:

=VLOOKUP(A2, ReferenceData!$A:$B, 2, FALSE)

This method is generally faster and more stable than using INDIRECT because it does not recalculate every time the workbook changes state. It is ideal when the target sheet is known but might be renamed occasionally, provided you update the formula accordingly. However, if you are trying to reference a cell value *inside* that range definition itself (like starting row 5 instead of row 1), you should combine this direct reference with INDIRECT or use INDEX and MATCH for greater flexibility.

Handling Dynamic Start Rows with Cell Values

Sometimes the issue arises not from the sheet name, but from the row numbers. Suppose you want the table array to start at the row indicated in cell H1. You cannot simply type $A$H1:$B$100 inside the range. Instead, you must build the address string dynamically:

=VLOOKUP(lookup_value, INDIRECT("'Sheet1'!A"&H1&":B100"), 2, FALSE)

Here, INDIRECT constructs the text 'Sheet1'!A5:B100 (assuming H1 contains 5) and passes it as a valid range. This technique is powerful for reports where the data header moves, but the structure remains consistent. Always ensure that the cell referenced in INDIRECT contains a valid text format for a range; otherwise, Excel will return a #REF! error.

Common Errors and Troubleshooting

When implementing dynamic ranges, several errors frequently occur. The most common is the #REF! error, which happens if the text string generated by INDIRECT points to a non-existent sheet or an invalid column letter. Ensure that any sheet names used in your cell references match exactly, including capitalization, although Excel is sometimes lenient with case.

Another potential issue is performance. Large workbooks using many INDIRECT functions may calculate slower because these functions are volatile, meaning they recalculate whenever any change occurs in the workbook. If you are experiencing sluggishness, consider whether a static reference or a structured table could achieve the same result. Additionally, always check for hidden characters in the cell containing your range text, as extra spaces can break the INDIRECT conversion.

For cases where VLOOKUP fails to find a match even when data exists, refer to our guide on handling no matches effectively. Furthermore, if you encounter #NAME? errors, verify that your Excel version supports the functions you are using, as older versions may lack certain dynamic features.

Frequently Asked Questions

Can I use a cell value to determine the column index number instead of the table array?

Yes, you can easily use a cell reference for the col_index_num argument. Simply replace the static number with the cell reference, such as =VLOOKUP(A2, D:F, G1, FALSE). This allows you to select which column to return data from via a dropdown or input cell.

Why does my VLOOKUP return #REF! when using INDIRECT?

This error usually indicates that the text string created by INDIRECT does not point to a valid range. Check that the sheet name in your cell is spelled correctly, includes necessary quotes if there are spaces, and that the column letters and row numbers are valid within the context of the workbook.

Is INDIRECT better than XLOOKUP for dynamic ranges?

XLOOKUP is generally more robust and easier to write than VLOOKUP with INDIRECT. However, XLOOKUP also accepts dynamic ranges constructed via INDIRECT or named ranges. If you are on a newer version of Excel, switching to XLOOKUP often resolves issues related to column insertion and left-to-right lookups.

How do I handle sheet names with spaces in the INDIRECT formula?

You must enclose the sheet name in single quotes within the text string. For example, if the sheet is named "Sales Data", the reference should be "'Sales Data'!A:B". The INDIRECT function requires this exact formatting to parse the sheet name correctly.

Can I use a named range instead of INDIRECT for dynamic arrays?

Yes, defining a Named Range that refers to a dynamic area (using the OFFSET or INDEX functions in the Name Manager) is a cleaner alternative. You can then reference that name directly in VLOOKUP, which avoids the volatility of INDIRECT and makes the formula easier to read.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More