User Posts: Rafiul Haq
In this article, we will show you 3 methods of how to create a training Matrix in Excel. We’ll make the Matrix from a dataset for the first 2 methods. To ...
We’re going to show you 10 methods of how to remove decimals in Excel with rounding. To demonstrate our methods, we’ve picked a dataset with 3 columns: ...
In this article, we’ll show you 5 Macro to send email from Excel. To demonstrate our methods, we’ve selected a dataset with 3 columns: “Name”, “Email”, and ...
In this article, we’re going to show you the quick steps of how to make an MIS report in Excel for sales. To demonstrate our method, we’ve picked a dataset ...
Often, we need to send emails to our customers when a condition is fulfilled. This article will show you 3 methods to send an email if conditions are met in ...
We often need to Share Excel files Online. In this article, we will show you 2 quick methods of how to Share Excel file Online. To demonstrate our methods ...
In this article, we’re going to show you the top 3 reasons along with solutions for cannot edit Excel file in Protected View. This is an Excel feature to open ...
In this article, we will show you 2 examples of how to Unprotect Excel Workbook without a Password using VBA. We have got a Protected Workbook with a Password. ...
In this article, we’re going to show you how to Automate Goal Seek in Excel. To demonstrate our methods, we’ve selected a dataset with 4 rows: “Base Price”, ...
In this article, we’re going to show you the top 5 reasons along with solutions for Flash Fill not working in Excel. To describe our methods to you, we’ve ...
We’ll show you 7 quick methods of how to calculate the difference between two dates in days in Excel. To demonstrate our methods, we’ve picked a dataset with 3 ...
When we want to establish a mathematical relationship between two variables, we use Correlation. Here, we’ll show you 2 methods of how to make and format a ...
We’re going to show you 5 quick methods of using VLOOKUP if a condition is between multiple ranges in Excel. For this purpose, we’ve taken a dataset with 2 ...
Often, we get our files in CSV format. That file format is not very user-friendly. In this article, we’re going to show 6 methods to convert CSV to XLSX ...
Often, we need to work with comments within a PDF file. We’ll show you 3 easy methods of how to export PDF comments into an Excel Spreadsheet. To demonstrate ...
- 1
- 2
- 3
- 4
- Next Page »
According to your example, Set cRange = Range(“C5, C8, C11”)
Then, you’ll need to change the height & width to MergeArea
.Width = cItem.MergeArea.Width
.Height = cItem.MergeArea.Height
Full Code >
Sub URLPhotoInsert2()
Dim cPhoto As String
Dim cPicture As Picture
Dim cRange As Range
Dim cItem As Range
Set cRange = Range(“C5, C8, C11”)
For Each cItem In cRange
cPhoto = cItem.Offset(0, -1)
If cPhoto = “” Then Exit Sub
Set cPicture = ActiveSheet.Pictures.Insert(cPhoto)
With cPicture
.ShapeRange.LockAspectRatio = msoFalse
.Width = cItem.MergeArea.Width
.Height = cItem.MergeArea.Height
.Top = Rows(cItem.Row).Top
.Left = Columns(cItem.Column).Left
.Placement = xlMoveAndSize
End With
Next
End Sub
The output will be this: https://ibb.co/KXHVzSC
Thank You.