How to Look Up and Display Images in Excel Based on Cell Value

📅 Jan 20, 2026 📝 Sarah Miller

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.

How to Look Up and Display Images in Excel Based on Cell Value

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.


Method 1: The Modern Way (In-Cell Images + XLOOKUP / VLOOKUP)

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.

Step 1: Insert Images Into Cells

To use this method, your source images must be embedded within cells:

  1. Select the cell where you want to place the image (e.g., cell B2 next to a product ID in A2).
  2. Go to the Insert tab on the Ribbon.
  3. Click Pictures > Place in Cell.
  4. Choose your source: This Device, Stock Images, or Online Pictures, and select your image.

The image will now scale automatically to fit inside the cell boundaries.

Step 2: Write the Lookup Formula

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.


Method 2: Using the New IMAGE Function (For Web-Based Images)

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.

The IMAGE Function Syntax

=IMAGE(source, [alt_text], [sizing], [height], [width])
  • source: The URL of the image (must use HTTPS protocol).
  • alt_text: (Optional) Description of the image for accessibility.
  • sizing: (Optional) Determines how the image fits the cell (0 = fit, 1 = fill, 2 = original size, 3 = custom size).

How to Dynamic Lookup with the IMAGE Function

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:

  1. The XLOOKUP function searches for the product name in cell D2 within range A2:A100.
  2. Once it finds a match, it returns the corresponding web URL from range B2:B100.
  3. The IMAGE function wraps around the result, converting the URL string into a visible, rendered image inside the cell.

Method 3: The Classic Way (Linked Pictures + Named Formulas)

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.

Step 1: Set Up Your Data Table

Create a reference table on a sheet named "Database".

  • In Column A, list your identifiers (e.g., Employee Names).
  • In Column B, place your images. Crucial: Ensure that each image fits entirely inside its respective cell. The formula will be looking up the cell itself, not the floating picture file.

Step 2: Create a Drop-Down Selector

  1. On your dashboard sheet, select cell E2.
  2. Go to the Data tab > Data Validation.
  3. Choose List under "Allow" and set the "Source" to your list of names: =Database!$A$2:$A$10.

Step 3: Define a Dynamic Name

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.

  1. Go to the Formulas tab > Name Manager.
  2. Click New....
  3. In the Name box, type a clear, descriptive name (e.g., GetEmployeePhoto).
  4. In the Refers to box, enter the following formula:
=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.

  • Click OK and close the Name Manager.
  • Step 4: Create the Linked Picture

    Now we need a picture on our dashboard that will listen to the formula we just created.

    1. Go to your "Database" sheet, select cell B2 (the cell containing the first image, not the image itself), and press Ctrl + C to copy it.
    2. Go back to your Dashboard sheet, select an empty cell, right-click, select Paste Special, and click Linked Picture (usually the icon with a picture and a chain link).
    3. With the newly pasted picture selected, look up at the Excel Formula Bar. It will show a simple cell reference, such as =$B$2.
    4. Change that cell reference in the Formula Bar to match the name you created in Step 3:
    =GetEmployeePhoto
  • Press Enter.
  • 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!


    Best Practices and Troubleshooting

    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:

    • Ensure HTTPS for Web Images: The 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.
    • Check Image Sizing: If your images appear extremely tiny, your row heights or column widths may be too restrictive. Adjust your grid size, or change the sizing parameter inside your IMAGE formula to best fit your design layout.
    • Handle Missing Images Gracefully: To avoid ugly error symbols like #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")
    • Ensure Exact Row Alignment for Linked Pictures: When using Method 3 (Linked Pictures), make sure your images do not overlap into neighboring cells. If an image overflows into Column C, that overflow will be cut off or display incorrectly in your dynamic linked picture.

    Conclusion

    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.