How to Use the IMAGE Function in Excel

Gone are the days when Excel spreadsheets didn’t have images. Now you can insert images from the Insert menu, and the latest Excel updates add an entire function for this purpose.

The IMAGE function in Excel can insert any image into any cell. It has extra arguments for configuring the image’s size, and you can also add alternative text. Read on to find out all about this handy Excel function.

4

What Is the IMAGE Function in Excel?

The IMAGE function in Excel is a built-in function that allows you to insert an image into your worksheet. This image must be hosted online so that you can obtain its URL address. You can use the function’s arguments to add alternative text to your image and/or resize it.

Here’s what each of the arguments indicates in the IMAGE function:

Excel logo on a background

Although the syntax might seem a bit complicated, the only required argument for this function to work is the image URL. So if you’re looking to quickly insert an image, you just need to input a valid URL, and that’s it.

Now it’s time for you to try out IMAGE for yourself. In this example, we have the names of some countries in a table. The goal is to insert an image of each country’s flag in an adjacent cell.

A sample spreadsheet in Excel

Since the flag cells are resized, you’re able to use custom height and width to fit the images exactly into the cells. Here’s how you can do that with the IMAGE function:

The formula calls on theIMAGEfunction and feeds it the USA flag fromFlagpedia. It refers to the country name as the alt text (A2), specifies that the inserted images will have custom sizes (3), and then indicates the height and width (20and30).

Inserting an image with the IMAGE function in Excel

If it’s the first time you’re using the IMAGE function, Excel will block the images. Simply click onTurn on imagesin the prompt to allow access. You should now see your image!

Once you repeat this for each country in the list, you’ll have all the flags next to each country’s name. That’s about it for using the IMAGE function on its own!

Inserting multiple images with the IMAGE function in Excel

Now that you’ve seen it in action, you’re probably wondering why even use this function. You could simplyuse the insert menu to insert images in Excelinstead, so why bother with IMAGE?

The advantage of IMAGE is that it is a built-in function in Excel. This inherent characteristic of IMAGE opens up a world of possibilities as you can combine it with other Excel functions.

How to Use IMAGE With Other Excel Functions

You can combine the IMAGE function with other Excel functions to create more powerful and dynamic spreadsheets. For instance, you can use it in combination withthe IF functionto display different images based on conditions.

Another useful combination is using IMAGE withthe VLOOKUP function in Excel. This way, you can insert images based on data in your spreadsheet. This is practical if you have a list of data with associated images, and you want to quickly insert the relevant image into your spreadsheet.

In the previous example, you probably noticed that the URL to each country’s flag only differed in the file name. Each country’s flag was the country’s code in lowercase, along with a .png extension.

You can use this technique to automatically insert country flags into your spreadsheet. Let’s replay the same example, albeit a bit smarter.

This time we have a table of each country’s code. We’re going to use VLOOKUP to get the code for each country and turn it into lowercase letters withthe LOWER function. Finally, we’re going to input this into the URL and the IMAGE function.

This formula has the same structure as the previous one, but the source argument is different. Here, theVLOOKUPfunction provides the equivalent ofA2from the tableF1:G9. Then theLOWERfunction turns the country code into lowercase letters. The first and third part of the URL are identical.

Feels good, huh? Now you don’t need to input the URL for each image one by one. Excel will take care of that for you. This was a demonstration of how useful functions and formulas can be. You need only put in effort for the first instance and create the formula. From there, you could effortlessly fill in the rest of the cells.

Picture-Perfect Spreadsheets With the IMAGE Function in Excel

Functions and formulas are the very fabric of Excel. Even if you could already do something through Excel’s user interface, having a function for it is still an advantage. The IMAGE function is proof.

With IMAGE, you can alter the settings for your image and use it in combination with other functions. You can set conditions so that different values spawn different images, or use VLOOKUP to insert images automatically.

You could already add images through the Excel interface, but now you know how to do it with the IMAGE function as well. If you’re looking to turbocharge your spreadsheet even further, then VBA might be worth learning.

You can easily insert images in your spreadsheets and manipulate them with macro code. Here’s how to insert a picture into a cell using VBA in Excel.

These are the best free movies I found on Tubi, but there are heaps more for you to search through.

Revolutionize your driving experience with these game-changing CarPlay additions.

Don’t let someone else take over your phone number.

Flagship price, mid-range phone.

One casual AI chat exposed how vulnerable I was.

Technology Explained

PC & Mobile