Sub AddPictureToCell()
Dim cell As Object
Dim ws As Worksheet
Dim myRange As Range
Dim myPhotos As ShapeRange
Application.ScreenUpdating = False
Set ws = Worksheets("Sheet1")
Set myRng = ws.Range("D3:D12")
On Error GoTo noPics
Set myPhotos = ws.Pictures.ShapeRange
If myPhotos.Count > 0 Then myPhotos.Delete
noPics:
For Each cell In myRng
cell.ColumnWidth = 12
cell.RowHeight = 37
If cell.Offset(0, -1).Value = 1 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\a.jpg").Select
If cell.Offset(0, -1).Value = 2 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\b.jpg").Select
If cell.Offset(0, -1).Value = 3 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\c.jpg").Select
If cell.Offset(0, -1).Value = 4 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\d.jpg").Select
If cell.Offset(0, -1).Value = 5 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\e.jpg").Select
If cell.Offset(0, -1).Value = 6 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\f.jpg").Select
If cell.Offset(0, -1).Value = 7 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\g.jpg").Select
If cell.Offset(0, -1).Value = 8 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\h.gif").Select
If cell.Offset(0, -1).Value = 9 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\i.gif").Select
If cell.Offset(0, -1).Value = 10 Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\j.gif").Select
If cell.Offset(0, -1).Value = "" Then ws.Pictures.Insert("C:\Documents and Settings\s\Desktop\Images\k.jpg").Select
With Selection
.Top = cell.Top
.Left = cell.Left
.Width = cell.Width
.Height = cell.Height
.Placement = xlMoveAndSize
.PrintObject = True
End With
Next cell
Application.ScreenUpdating = True
ActiveSheet.Range("H5").Select
End Sub