this macro might get you started. It assumes all the picture files follow the naming convention you described. It takes all the files in the specified directory that conform to that naming pattern, extracts the x and y values and places the pictures in cells using those co-ordinates relative to a central cell (assumed here to be cell N10).
for this to achieve the effect you want, the cells will have to be resized to roughly the same dimensions as the pictures you import
Sub pictures_place()
Dim MyDir, MyPic, CentreCell As Range, xx As Long, yy As Long, ll As Long, rr As Long, Xpos As Long, YPos As Long
Set CentreCell = Range("N10")
MyDir = "C:\MyPictures\"
MyPic = Dir(MyDir & "picture*.jpg")
Do While MyPic <> ""
ll = InStr(LCase(MyPic), "x")
mm = InStr(LCase(MyPic), "y")
rr = InStr(LCase(MyPic), ".")
Xpos = Mid(MyPic, ll + 1, mm - ll - 1)
YPos = Mid(MyPic, mm + 1, rr - mm)
CentreCell.Offset(Xpos, YPos).Select
ActiveSheet.Pictures.Insert(MyDir & MyPic).Select
MyPic = Dir
Loop
Set CentreCell = Nothing
End Sub
Bookmarks