First off all, sorry for my bad english,
I hope anyway, that you would be able to understand me
)
Simplifying, this is what I would like to do:
I have three columns:
in the cells of column A, there is text
in the cells of column B, there is text
in the cells of column C, I would like to insert, using macro, different images.
The images in each cell of column C should be taken in:
"C: \ path \ images" + "the text of the cell in the A column of the same line" +. "Jpg"
That is:
C1: "C: \ path \ images" + A1 +. "Jpg"
C4: "C: \ path \ images" + A4 +. "Jpg"
C7: "C: \ path \ images" + A7 +. "Jpg"
C10: "C: \ path \ images" + A10 +. "Jpg"
And so on every three lines...
This is why: each cell where I want to insert the image if followed by 2 other lines with extra data.
That is, as stated before,
I would like the macro will work only in the cells:
C1, C4, C7, C10, C13, C16, C19, C22, etc. (every 3 line in the cell in "C" column)
Can you help?
A person in another forum to insert images in cells posted this macro,
but I don't know how to change it to resolve my problem 
Public Sub m()
Dim sImmagine As String
Dim sPath As String
Dim c As Range
Dim rng As Range
Dim sh As Worksheet
Dim lLarghezza As Long
sPath = "C:\Prova\"
Set sh = Worksheets("Foglio1")
With sh
Set rng = .Range("H1:H20")
For Each c In rng
If c.Value <> "" Then
sImmagine = ""
sImmagine = sPath & _
c.Value & ".jpg"
If Dir(sImmagine) <> "" Then
c.Select
.Pictures.Insert( _
sImmagine).Select
Selection.ShapeRange.Width = _
c.Width
End If
End If
Next
End With
Set c = Nothing
Set rng = Nothing
Set sh = Nothing
End Sub
Thank you really a lot!!!
Bookmarks