Sub MakeIcons()
Dim sh As Shape, myShape As Shape
Dim lastRow As Long, i As Long
Dim pasteRange As Range
Dim searchRange As Range
'Define our reference points
Set sh = Worksheets("Icon").Shapes("Picture 1")
Set searchRange = Worksheets("Records").Range("B2:B100")
Application.ScreenUpdating = False
With Worksheets("Need Formula")
'Clear out any old shapes
For Each myShape In .Shapes
myShape.Delete
Next myShape
lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
sh.Copy
For i = 2 To lastRow
If UCase(searchRange.Find(.Cells(i, "A").Value).Offset(0, -1).Value) = "YES" Then
Set pasteRange = .Cells(i, "C")
.Paste pasteRange
Set myShape = .Shapes(.Shapes.Count)
'Resize the icons to fit
myShape.Height = pasteRange.Height * 0.9
'Center horizontally
myShape.Left = pasteRange.Left + pasteRange.Width / 2 - myShape.Width / 2
myShape.Top = pasteRange.Top + 1
End If
Next i
.Select
.Range("A1").Select
End With
Application.ScreenUpdating = True
End Sub