-
Here's one method to try. Needs a bit more work!
[vba]Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim TeamPic As Range, Pic
If Target.Column = 2 Then
Set TeamPic = Columns("P").Find(Target.Value).Offset(, 2)
For Each Pic In ActiveSheet.Pictures
If Pic.TopLeftCell.Address = Target.Offset(, -1).Address Then
Pic.Delete
GoTo NewPic
End If
Next
NewPic:
For Each Pic In ActiveSheet.Pictures
If Pic.TopLeftCell.Address = TeamPic.Address Then
Pic.Copy
Target.Offset(, -1).Activate
ActiveSheet.Paste
Target.Activate
Exit Sub
End If
Next
End If
End Sub
[/vba]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules