Sub InsertImageIntoCell(imgPath As String, targetCellAddress As String)
Dim ws As Worksheet
Dim img As Object
Dim targetCell As Range
Dim cellLeft As Double
Dim cellTop As Double
Dim cellWidth As Double
Dim cellHeight As Double
' Set your worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
' Set the target cell
Set targetCell = ws.Range(targetCellAddress)
' Get the cell's properties
cellLeft = targetCell.Left
cellTop = targetCell.Top
cellWidth = targetCell.Width
cellHeight = targetCell.Height
' Insert the image
Set img = ws.Pictures.Insert(imgPath)
' Adjust the image size to fit the cell
With img
.Left = cellLeft
.Top = cellTop
.LockAspectRatio = msoFalse
.Width = cellWidth
.Height = cellHeight
End With
End Sub