Fortunately, many of us use Excel in our business organizations. In any business organization, we use Excel to organize data as per need and make databases for the future. Moreover, one interesting thing is that we can insert pictures automatically size to fit cells easily. However, I have used Microsoft Office 365 for the purpose of demonstration, and you can use other versions according to your preferences. In this article, I will show you 3 easy methods of how to insert pictures in Excel automatically size to fit cells. Hence, read through the article to learn more and save time.
How to Insert Pictures Automatically Size to Fit Cells in Excel: 3 Suitable Methods
Often, we need to insert Pictures automatically size to fit cells for certain business analytics, and the process becomes more interesting with Excel. However, the task is easy and simple. But you will need an arrangement in order to perform the operation properly. For the purpose of demonstration, I have used the following sample dataset. Here, the dataset contains information about Microsoft office products. Hence, there are 2 columns which are Product, and Image.
1. Utilize Keyboard Shortcuts to Insert Pictures to Fit Cells
First of all, you can apply Keyboard Shortcuts to insert pictures in Excel automatically size to fit cells. However, Microsoft Excel has plenty of shortcuts that help us do work faster and save time. Hence, go through the following steps in order to complete the operation.
📌 Steps:
- In the beginning, select cell C5.
- Then, go to the Insert tab and click on Illustrations.
- Next, select Pictures and click on This Device.
- Now, select the picture you want to insert from the device where the images are stored and click Insert.
- Similarly, add other pictures as well.
- After that, adjust the cells according to your desired size.
- Now, hold the Alt key and drag the Microsoft Excel picture until it fits into the cell. Here, the Alt key helps to fit the picture into the entire cell.
- Finally, adjust all the pictures using a similar process.
Read More: How to Insert Picture in Excel Cell Automatically
2. Use Format Picture Option in Excel
Furthermore, you can use the Format Picture option to insert pictures in Excel automatically size to fit cells. However, the process is quite simple and easy. Additionally, it is available on all versions of Microsoft Excel. Hence, read through the following steps to complete the operation easily.
📌 Steps:
- Initially, select the Excel product picture and right-click.
- Then, go to Format Picture.
- Next, select Size and set the Height and Width according to your cell size.
- Afterward, the image will fit into the cell.
- Similarly, follow the process for the other pictures.
Read More: How to Insert Picture in Excel Using Formula
3. Insert Pictures Automatically Size to Fit Cells with Excel VBA
Last but not least, a VBA code can also help you to insert pictures in Excel automatically size to fit cells. A VBA code is necessary for this method. However, you can just copy the code and run it in your Excel worksheet. Hence, go through the following steps in order to complete the task properly.
📌 Steps:
- Firstly, hold the Alt + F11 keys in Excel, which opens the Microsoft Visual Basic Applications window.
- Secondly, click the Insert button and select Module from the menu to create a module.
- Thirdly, a new window will open and write the following VBA macro in the Module.
Public Sub AutoResizeImage()
On Error GoTo Select_Image
Dim ZImageWtoHRatio As Single
Dim QWtoHRatio As Single
With Selection
ZImageWtoHRatio = .Width / .Height
End With
With Selection.TopLeftCell
QWtoHRatio = .Width / .RowHeight
End With
Select Case ZImageWtoHRatio / QWtoHRatio
Case Is > 1
With Selection
.Width = .TopLeftCell.Width
.Height = .Width / ZImageWtoHRatio
End With
Case Else
With Selection
.Height = .TopLeftCell.RowHeight
.Width = .Height * ZImageWtoHRatio
End With
End Select
With Selection
.Top = .TopLeftCell.Top
.Left = .TopLeftCell.Left
End With
Exit Sub
Select_Image:
MsgBox "Choose an Image and Run the Macro."
End Sub
- Fourthly, select a picture and press the F5 key to run the code.
- Lastly, select other pictures one by one and run the code similarly.
Read More: How to Insert Picture in Excel Cell with Text
How to Lock Picture in Excel Cell
Sometimes, we may need to insert images in our Excel worksheet to visualize the products or services. But, when we move or resize the cell ranges, the images associated with it don’t get changed. So, it is necessary to lock the images so that the changes affect them too. For the purpose of the demonstration, I will use the same dataset as before. Hence, follow the steps mentioned below.
📌 Steps:
- Initially, select the Excel product picture and right-click.
- Then, go to Format Picture.
- As a result, the Format Picture pane will open up on the right side of the worksheet.
- After that, under the Size & Properties tab, select Properties. There, check the circle for Move and size with cells.
- Now, select other pictures as well and check the circle.
- To see the changes, move row 5 to the 10th row.
- Finally, you’ll see the contents of the 5th row now in the 10th row including the picture.
Read More: How to Lock Image in Excel Cell
Download Practice Workbook
You can download the workbook used for the demonstration from the download link below.
Conclusion
These are all the steps you can follow to insert pictures in Excel automatically size to fit cells. Overall, in terms of working with time, we need this for various purposes. I have shown multiple methods with their respective examples, but there can be many other iterations depending on numerous situations. Hopefully, you can now easily create the needed adjustments. I sincerely hope you learned something and enjoyed this guide. Please let us know in the comments section below if you have any queries or recommendations.