How to Insert Picture into Excel Cell

Excel makes it easy to insert pictures into your spreadsheets. This can be useful for adding visual interest, illustrating data, or creating custom charts and graphs.

Step 1: Insert the Picture

To insert a picture into Excel, follow these steps:

Click the Insert tab.

In the Illustrations group, click Pictures.

Browse to the picture that you want to insert and select it.

Excel insert pictures ribbon

Step 2: Format the Picture

Once you have inserted the picture, you can format it to your liking. Here are a few things you can do:

Resize the picture: Click and drag the edges of the picture to resize it.

Excel insert pictures adjust cell

Note: You don’t have to stretch the cell size if your picture is small. You can therefore skip this step if you don’t need it.

Move the picture: Click and drag the picture to move it to a different location.

Change the picture’s borders: Click the Format Picture button and then click the Border tab. In the Border Style section, select the border style that you want.

Excel insert pictures format picture

Click on the square with four different directional arrows (1), click properties (2), and choose move and size with cells (3).

Excel insert pictures properties

Resize the picture by clicking on the edge, and finally move it to the cell, where you want it. To move the picture, click on it to select it and drag it to the desired location.

See also  How to Write Name with Initials

Excel insert pictures reduce size

Drag its edges to adjust its size.
Excel insert pictures picture inserted
Note: No need to alter cell dimensions for small pictures.

Change the picture’s fill color: Click the Format Picture button and then click the Fill tab. In the Fill Color section, select the fill color that you want.

Step 3: Link or Embed the Picture

By default, when you insert a picture into Excel, it is linked to the file on your hard drive or network. This means that if the picture file is moved or deleted, the picture in Excel will become a broken link and will not be displayed.

To avoid this, you can embed the picture into the Excel file. This will make the picture a permanent part of the spreadsheet, so it will not be affected if the original file is moved or deleted.

To embed a picture, follow these steps:

  1. Right-click the picture and select Format Picture.
  2. In the Format Picture dialog box, click the Properties tab.
  3. In the Link to File section, select the Embed option.
  4. Click OK.

Inserting Pictures with Excel VBA

With VBA, you can automate the process of generating charts, visuals, or even custom images that respond to changing data or user interactions.

Sub CreateDynamicPicture()
    ' Declare variables
    Dim ws As Worksheet
    Dim shp As Shape

    ' Set the worksheet where you want to insert the picture
    Set ws = ThisWorkbook.Sheets("Sheet1")

    ' Add a picture to the worksheet
    Set shp = ws.Shapes.AddPicture("C:\Path\To\Your\Image.jpg", msoFalse, msoTrue, 100, 100, 300, 200)

    ' Customize the picture properties
    With shp
        .Name = "DynamicPicture"
        .TopLeftCell.FormulaR1C1 = "=R1C1" ' Make the picture cell-relative
        ' You can add more properties and customize the picture further
    End With
End Sub

Use this VBA code as a simplified example of how to use VBA to create a dynamic picture in Excel.