Related:
- Autofill based on filename in same/different folder.
- Anvi folder locker reset key - Guide
- Ps3 update folder - Guide
- Chrome extensions folder - Guide
- Safari autofill - Guide
- Clear autofill chrome - Guide
1 response
I propose this :
You must, via the Tools/References menu in VBA Editor, add "Microsoft Scripting Runtime" to you project.
Option Explicit
Sub jacek()
Dim filesys As Scripting.FileSystemObject
Dim myfolder As Scripting.Folder
Dim onefile As Scripting.File
Set filesys = New Scripting.FileSystemObject
Dim filename As String
Dim aa As String, bb As String, cc As String
Set myfolder = filesys.GetFolder("path to the folder")
For Each onefile In myfolder.Files
filename = onefile.Name
If Right(filename, 4) = ".jpg" Then
aa = Left(filename, 2)
bb = Mid(filename, 3, 2)
cc = Mid(filename, 5, 2)
If CInt(aa) = Range("a1") Then
If CInt(bb) = 23 Then
Range("b2").Value = "X"
End If
End If
End If
Next
End Sub
You must, via the Tools/References menu in VBA Editor, add "Microsoft Scripting Runtime" to you project.
Nov 28, 2016 at 04:51 AM
Nov 28, 2016 at 06:21 AM