Ken,
Select the cells (either manually or in code) where you want the picture to go, and then run this
macro.
Sub InsertAndResizePicture()
Dim myR As Range
Set myR = Selection
'Insert the picture
ActiveSheet.Pictures.Insert( _
Application.GetOpenFilename( _
"JPG picture files (*.jpg),*.jpg", , "Select the picture")).Select
'scale the picture to the width of the column
myScale = Application.Min(myR.Width / Selection.ShapeRange.Width, _
myR.Height / Selection.ShapeRange.Height)
Selection.ShapeRange.ScaleWidth myScale, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight myScale, msoFalse, msoScaleFromTopLeft
myR.select
End Sub
You of course can modify it to choose the range and filenames in code...
Sub InsertAndResizePicture2()
Dim myR As Range
Set myR = Range("Range_Name")
'Insert the picture
ActiveSheet.Pictures.Insert( "C:\PictureFiles\Picture1.jpg").Select
'scale the picture to the width of the column
myScale = Application.Min(myR.Width / Selection.ShapeRange.Width, _
myR.Height / Selection.ShapeRange.Height)
Selection.ShapeRange.ScaleWidth myScale, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight myScale, msoFalse, msoScaleFromTopLeft
myR.Select
End Sub
HTH,
Bernie
MS Excel MVP