Managing Excel dashboards where data updates but associated graphics remain stubbornly static is a tedious, error-prone manual task. While standard VLOOKUP or INDEX/MATCH functions easily retrieve text, they inherently fail to pull images.
Implementing a dynamic image lookup grants your spreadsheets true visual automation, transforming static sheets into interactive databases. However, a key stipulation must be met: your images must be nested directly within the cell grid rather than floating on top. This approach is highly effective for automated product catalogs and employee ID rosters.
Below, we will detail how to configure named formulas and the INDEX/MATCH syntax to seamlessly link images to cell values.
Excel is an incredibly powerful tool for managing data, but text and numbers can only tell part of a story. Whether you are building an interactive product catalog, an executive dashboard, an employee directory, or an inventory tracker, adding visual elements can make your spreadsheets significantly more engaging and easier to read.
Historically, looking up an image based on a cell value in Excel was a complex task requiring clunky VBA macros or intricate workarounds using Named Ranges and Linked Pictures. Fortunately, with recent updates to Microsoft 365, Excel has introduced native features like the IMAGE function and In-Cell Images that make this process incredibly simple.
In this comprehensive guide, we will explore the three best methods to look up images dynamically in Excel based on a cell value, ranging from the most modern formulas to classic workarounds for older versions of Excel.
If you are using Microsoft 365 or Excel for the Web, Excel now supports placing images directly inside a cell rather than having them float on top of the grid. When an image is embedded inside a cell, it behaves exactly like text or numbers, meaning standard lookup formulas like VLOOKUP, XLOOKUP, and INDEX/MATCH will work natively without any workarounds.
To use this method, your source images must be embedded within cells:
The image will now scale automatically to fit inside the cell boundaries.
Once your master data table is set up with IDs in Column A and In-Cell Images in Column B, you can easily pull the image into another dashboard sheet using a standard lookup formula.
Using XLOOKUP (Recommended):
=XLOOKUP(E2, A2:A10, B2:B10, "Image Not Found")
In this formula:
E2 is the cell containing the lookup value (e.g., the Product ID you want to search for).A2:A10 is the range containing the list of Product IDs.B2:B10 is the range containing the embedded images.Using VLOOKUP:
=VLOOKUP(E2, A2:B10, 2, FALSE)
Because the image behaves as standard cell content, the formula will return the actual image directly in your destination cell. If you change the value in cell E2, the image will instantly update.
If your images are hosted online (e.g., on a company server, OneDrive, or a public website), you can use Excel's native IMAGE function. This function takes a URL as an input and displays the corresponding image inside the cell.
=IMAGE(source, [alt_text], [sizing], [height], [width])
Imagine you have a table where Column A lists product names, and Column B lists the URLs pointing to their respective product photos. You can combine IMAGE with XLOOKUP to retrieve the URL and render the image on the fly.
=IMAGE(XLOOKUP(D2, A2:A100, B2:B100))
How it works:
XLOOKUP function searches for the product name in cell D2 within range A2:A100.B2:B100.IMAGE function wraps around the result, converting the URL string into a visible, rendered image inside the cell.If you are using an older version of Excel (Excel 2013, 2016, or 2019) or need to use images that float over the cells rather than sitting inside them, you cannot use standard formulas. Instead, you must use a clever workaround called the Linked Picture Method.
This method requires defining a dynamic named range using the INDEX and MATCH functions, and then linking an image placeholder to that name.
Create a reference table on a sheet named "Database".
E2.=Database!$A$2:$A$10.Because normal cells can't dynamically display floating pictures without a trick, we must create a Named Formula that calculates where the image is stored based on the dropdown selection.
GetEmployeePhoto).=INDEX(Database!$B$2:$B$10, MATCH(Dashboard!$E$2, Database!$A$2:$A$10, 0))
Note: Ensure you are using absolute references (with $ signs) so the formula references do not shift.
Now we need a picture on our dashboard that will listen to the formula we just created.
B2 (the cell containing the first image, not the image itself), and press Ctrl + C to copy it.=$B$2.=GetEmployeePhoto
Now, whenever you change the employee name in your dropdown menu in cell E2, the Linked Picture will dynamically evaluate your formula, locate the corresponding cell in Column B of your database, and project its visual contents in real-time!
While looking up images in Excel has become vastly easier, there are a few common pitfalls that can break your setup. Here is how to avoid them:
IMAGE function requires secure URLs starting with https://. Standard http:// links or local file paths (like C:\images\pic.png) will return a #VALUE! error.sizing parameter inside your IMAGE formula to best fit your design layout.#N/A when a lookup value is missing, wrap your formulas in an IFERROR or use the built-in default argument of XLOOKUP:
=IFERROR(IMAGE(XLOOKUP(E2, A:A, B:B)), "No Image Available")
Adding dynamic image lookups to your spreadsheets transforms boring databases into interactive, visual applications.
If you are working with the latest version of Microsoft 365, utilizing In-Cell Images combined with XLOOKUP is by far the cleanest, fastest, and most robust solution. If your images live on a cloud server, the IMAGE function provides an elegant way to render photos directly from the web. For users on legacy versions of Excel, the tried-and-tested Linked Picture with Named Formulas remains an invaluable technique to achieve high-end dashboard features.
Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.