This will strip the names out of the path strings.
Sub StripFileName()
With Sheets(1)
rSh1LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
Set rSh1Range = .Range("A1:A" & rSh1LastRow)
End With
For Each rSh1Cell In rSh1Range 'read from sheet(1)
If Right(rSh1Cell.Value, 3) = "JPG" Then '*** Asterisks mark lines that can be _
removed/edited if not specifying JPG files
'recognition to: Author Merjet from microsoft.public.excel.programming
For vCt = Len(rSh1Cell) To 1 Step -1
If Mid(rSh1Cell, vCt, 1) = "/" Then
rSh1Cell.Offset(0, 1).Value = Mid(rSh1Cell, vCt + 1, 20)
Exit For
End If
Next vCt
End If '***
Next rSh1Cell
End Sub
I am still working on removing NON-duplicates as you stated. Perhaps this will get you or some else started. I will get back on this when I can.
Bookmarks