How to Insert Pictures Automatically Size to Fit Cells in Excel (3 Suitable Methods)

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.

insert pictures in excel automatically size to fit cells dataset


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.

Utilize Keyboard Shortcuts to Insert Pictures to Fit Cells Automatically

  • 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.

insert pictures in excel automatically size to fit cells

  • 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.

Use Format Picture Option in Excel to Insert Pictures Automatically Size to Fit Cells

  • 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.

Insert Pictures Automatically Size to Fit Cells with Excel VBA

  • 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

insert pictures in excel automatically size to fit cells

  • 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.

How to Lock Picture in Excel Cell

  • 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.

insert pictures in excel automatically size to fit cells

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.


Related Articles


<< Go Back to Excel Insert Pictures | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shamima Sultana
Shamima Sultana

Shamima Sultana, BSc, Computer Science and Engineering, East West University, Bangladesh, has been working with the ExcelDemy project for 2 years. She has written over 75+ articles and reviewed 1000+ articles for ExcelDemy. She has also led several teams with Excel VBA and Content Development works. Currently, she is working as the Project Manager and oversees the day-to-day work, leads the services team, allocates resources to the right area, etc. Her work and learning interests vary from Microsoft... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo