Excel IMAGE function – Now insert a Picture in a Cell using a Formula

← PrevNext →

You can insert an image in Excel by simply dragging and dropping the image anywhere in your worksheet. Its a floating image, that is, you can drag or move the image anywhere in your worksheet. However, with the newly introduced IMAGE() function, you can now insert an image in a cell using a formula.

Excel IMAGE function Syntax

IMAGE(source, alt_text, sizing, height, width)

See this image.

Excel IMAGE function

The IMAGE() function takes five parameters (or arguments). The function inserts an image using a URL.

The supported image formats are… png, jpg, jpeg, gif, ico and tif.

Note: Currently, the IMAGE() function is available only to users who have access to Microsoft 365 or Excel for the Web.

Well, if you do not have Microsoft 365 account, don't worry, you can still insert an image in your Excel worksheet by simply dragging and dropping the image anywhere on the sheet. You can place it or resize it according to you requirement. However, the image remains floating.

Now, let’s get back to the new IMAGE() function.

Like I said, the function takes five arguments.

1) source – The source of the image or the URL of the image. This is required.

2) alt_text – You can use this option to provide the image with a name or a description. This is optional.

3) sizing – This is optional. Use this option to set the dimension of the image. The values are,
0 – (default). It will fit the image in the cell using aspect ratio.
1 – Fill the cell with the image. It will ignore aspect ratio.
2 – Show the image as it is, that is, the original size of the image.
3 – use this value to set the image height and width.

4) height – You can assign a height (in pixel) to the image using this option. This is optionaloptional.

5) width – You can assign a width (in pixel) to the image. This is optional.

Add Image in a cell in Excel using a Formula

If you can access Microsoft 365, sign in to it and open Excel.

Choose a cell and write the IMAGE() function like any other function. For example,

=IMAGE("https://www.encodedna.com/images/about-arunbanik.jpg")

Press the Enter key once you have finished writing the formula.

using formula in excel to add image in cell

That’s it. Its that simple.

Here’s some important tip. When you first write the formula using the IMAGE function, it will adjust the image inside the cell. The image will not even be visible properly. That’s the default behavior.

Now, if you see the above image, where I have added my picture in Microsoft 365 Excel worksheet, the picture looks big enough and its clearly visible. How? I have used two options, Wrap Text and Merge & Center, after adding the picture.

The formula also has alt_text option (the 2nd argument), where I have described the picture with a small description.

Adding dynamic arguments to IMAGE function

You can make this a little more dynamic by providing arguments to the IMAGE() function with values extracted from different cells.

dynamically add arguments to IMAGE function in Excel

This way you can create a table or list of products or places with images.

You will also need this formula... The formula to Calculate Percentage (%) change in Excel

Thanks

← PreviousNext →