The IMAGE function in Excel enables us to return an image to a cell using an Excel formula.
This function makes it easy to lookup images based on a cell value, and because the image is stored in the cell, it is returned when sorting and filtering, and when using other functions such as XLOOKUP, FILTER and IF.
Excel IMAGE Function
The IMAGE function accepts five arguments, but only the source argument is mandatory. The other arguments enable us to specify alternative text and to specify the size of the image.
IMAGE(source, [alt_text], [sizing], [height], [width])
- Source: The URL of the image file. This can be entered as a text string, be a reference to a cell containing the URL path, or be a formula that returns a valid URL path.
- Alt text: The alternative text for the image.
- Sizing: Determines the dimensions of the image. There are four options to choose from.
- 0 – used to fit the picture to the cell maintaining its aspect ratio.
- 1 – fill the cell ignoring the aspect ratio.
- 2 – keep the original image size even if it ignores the cell boundary.
- 3 – set the images height and width.
- Height: The image height in pixels.
- Weight: The image width in pixels.
The Excel IMAGE function can handle numerous image formats including JPEG, PNG, bitmap, TIFF, and more. The source, however, must be a URL using the ‘https’ protocol.
Download the practise workbook to follow along.
Let’s see some examples of it in action.