Transform your spreadsheets with compelling visuals using these three innovative ways to insert images directly into Microsoft Excel cells, making your data more communicative and effective.

Have you ever wanted to enrich your spreadsheets? Excel with visuals inserted directly into cells? Until recently, inserting images into Excel cells seemed like an impossible task. Traditionally, Excel only allowed you to handle text, numbers, dates, Boolean values, and errors in cells. Images could be placed over cells, but not inserted as actual cell content. Fortunately, Microsoft has introduced new features that finally allow you to embed images directly into cells, turning them into a data type in their own right. In this article, we'll explore three effective methods for inserting images into Excel cells, offering solutions for different needs and skill levels.
Method 1: Use geographic data types
The first approach to inserting images into Excel cells takes advantage of geographic data types, a feature that allows you to transform simple text into information-rich data from the web.
What are geographic data types?
Geographic data types are a special category of data in Excel that lets you connect place names (such as countries, states, or provinces) to additional information available online. When you convert text to a geographic data type, Excel automatically connects to online databases to retrieve related information such as population, capital, flag, and other relevant data.
These data types are especially useful when you are working with lists of geographic locations and want to enrich your spreadsheet with visual information such as national flags. The distinguishing feature of the data types is their ability to contain multiple pieces of information within a single cell, including images.
How to Convert Text to Geographic Data Type
To transform a simple list of geographic names into data types that include images, follow these steps:
- Enter the names of countries, states or provinces into a column of your spreadsheet
- Select all cells containing geographic names
- Go to the tabDatain the Excel ribbon
- Search for the groupData typesand click the buttonGeography
Once you have done this, you will notice that a small map icon will appear next to each geographic name. This icon indicates that the cell no longer contains plain text, but a full geographic data type. When you click this icon, an information card will open showing all the data associated with that location, including an image of the flag at the top of the card.
How to extract flag image in cell
After converting the names to geographic data types, you can extract the flag image directly into an adjacent cell:
- Select all cells containing geographic data types
- Click the buttonExtractwhich appears in the upper right corner of the selection
- Select the optionImagefrom the drop-down menu
Excel will automatically insert the flag images into adjacent cells. If you look at the formula bar, you will notice that it is actually a formula that uses dot notation, for example=B2.Immagine
This formula references the cell containing the geographic data type and specifically extracts the image attribute from it.
A helpful tip: you can copy these cells containing images and paste them as values in other locations. This way, the images will no longer be linked to the original data types and you can manipulate them independently.
Method 2: Create organizational data types with Power BI
If you need to insert custom images into Excel cells, geographic data types may not be enough. In this case, you can create custom organizational data types using Power BI.
Requirements for organizational data types
Before we begin, it is important to know that this feature requires:
- A Power BI Pro license
- A data table containing image URLs
- Access to Power BI Desktop and Power BI online service
This method is especially useful for organizations that want to create product catalogs, employee lists with photos, or any other dataset that would benefit from the inclusion of custom images.
Creating an Organizational Data Type in Power BI
To create an organizational data type with images, follow these steps:
- Open Power BI Desktop
- Import the data table containing the image URLs (can come from Excel or other sources)
- Switch to viewModel
- Select the imported table
- In the boxProperty, set the optionIt is featured tableonYes
- Add aDescriptionfor the table
- Select a column asRow label(this will be the text displayed in the Excel cell)
- Select a column asKey column(must be a unique identifier)
Next, you need to configure the column that contains the image URLs:
- Switch to viewData
- Select the column containing the image URLs
- Go to the tabColumn Tools
- Set theData CategoryonImage URL
Finally, you need to publish the dataset to Power BI online:
- Go to the tabHome
- Click the buttonPublic
- Select a workspace (important: do not usePersonal work area)
- ClickSelect
Using the Organizational Data Type in Excel
Once you publish your dataset, you can use the new organizational data type in Excel:
- Make sure Excel is signed in to the same Microsoft account you use for Power BI
- Enter some values corresponding to the columnRow labelof your dataset
- Select these cells
- Go to the tabData
- Expand the menuData type
- Find your custom data type in the sectionFrom your organization
After you convert the values to the custom data type, you can extract the images in the same way as described for geographic data types. The resulting formula will look like=B2.Immagine
, where “Image” corresponds to the name of the column configured as the image URL.
Method 3: Use the IMAGE function
If the above methods seem too complex or not suitable for your needs, Excel offers a more direct alternative: the IMAGE function. This function allows you to insert an image directly into a cell by specifying the URL of the image.
IMAGE function syntax
The IMAGE function has the following syntax:
=IMAGE(url, testo_alt, dimensionamento, altezza, larghezza)
Where:
url
is the web address of the image (required argument)testo_alt
is an alternative text for accessibility (optional argument)dimensionamento
determines how the image fits into the cell (optional argument)0
fit image to cell while maintaining aspect ratio (default)1
fills the cell ignoring the image proportions2
maintains the original image size3
allows you to specify custom dimensions
altezza
specify the height of the image (required when sizing = 3)larghezza
specify the width of the image (required when sizing = 3)
Examples of using the IMAGE function
Here are some practical examples of how to use the IMAGE function:
- Insert an image while maintaining the proportions:
=IMAGE("https://esempio.com/immagine.jpg")
- Insert an image with alt text:
=IMAGE("https://esempio.com/logo.png", "Logo aziendale")
- Insert a custom-sized image:
=IMAGE("https://esempio.com/foto.jpg", "Foto prodotto", 3, 100, 150)
The image URL can be entered directly as a text string or can refer to a cell containing the web address.
Tips for using IMAGE
To get the best results with the IMAGE function, consider these tips:
- You can use cloud storage services like OneDrive or SharePoint to host your images and get accessible URLs
- When sharing a OneDrive file, be sure to set access as “Anyone with the link” to ensure the image is visible.
- To change the size of the cell containing the image, you can adjust the row height or column width.
- If the image appears too large or too small, try using the argument
dimensionamento
to control how it is displayed
The IMAGE function represents the most direct and flexible method for inserting images into Excel cells, without requiring complex configurations or additional licenses.
Comparison of the three methods
To help you choose the method that best suits your needs, here is a comparison table
Method | Advantages | Limitations | Ideal for |
---|---|---|---|
Types of geographic data | Easy to implement, no external URLs required | Limited to images of flags and geographical locations | Spreadsheets with geographic data |
Types of organizational data | Customizable, reusable across the organization | Requires Power BI Pro license and complex configuration | Product catalogs, company directories |
IMAGE function | Simple, direct, no complex configurations required | Requires publicly accessible image URLs | General use, projects personal |
Conclusions
Inserting images into Excel cells is a significant step forward in visualizing data and creating more communicative spreadsheets. The three methods presented offer solutions for different needs:
- THEtypes of geographic dataThey are perfect for those who work with country, state or province data and want to quickly view the corresponding flags.
- THEOrganizational data typesThey offer an advanced solution for companies that need product catalogs or directories with customized images.
- ThereIMAGE functionrepresents the most direct and versatile approach, ideal for most users who simply want to insert images into their cells.
Whichever method you choose, adding images to Excel cells can significantly transform your spreadsheets, making them more informative, engaging, and visually appealing. Experiment with these methods and see how visuals can improve the communication of your data!
Published inExcel
Comment first