Finding file names in a local folder
Solved/Closed
gogazapr
Posts
3
Registration date
Friday June 18, 2021
Status
Member
Last seen
February 7, 2022
-
Jun 18, 2021 at 09:55 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 29, 2021 at 11:54 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 29, 2021 at 11:54 AM
Related:
- Finding file names in a local folder
- Safari cannot open the page because it is a local file - Guide
- Windows 10 iso file download 64-bit - Download - Windows
- Anvi folder locker reset key - Guide
- Ideogram ai names - Guide
- My contacts list names - Guide
2 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jun 21, 2021 at 11:56 AM
Jun 21, 2021 at 11:56 AM
Hi Gogazapr,
When you have your filenames (with extention) in column A, then the code below will place an "x" in column B next to the filenames that are found.
Here is the code:
Let us know if something is unclear or you want a different output.
Best regards,
Trowa
When you have your filenames (with extention) in column A, then the code below will place an "x" in column B next to the filenames that are found.
Here is the code:
Sub RunMe() Dim Filename, Pathname As String Dim mFind As Range Pathname = ActiveWorkbook.Path & "\Test Map\" Filename = Dir(Pathname & "*") Do While Filename <> "" Set mFind = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Find(Filename) If Not mFind Is Nothing Then mFind.Offset(0, 1).Value = "x" Filename = Dir() Loop End Sub
Let us know if something is unclear or you want a different output.
Best regards,
Trowa
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jun 29, 2021 at 11:54 AM
Jun 29, 2021 at 11:54 AM
Hi Gogazapr,
It will with the code below (as long as your filenames don't contain any periods):
Best regards,
Trowa
It will with the code below (as long as your filenames don't contain any periods):
Sub RunMe() Dim Filename, Pathname As String Dim mFind As Range Pathname = ActiveWorkbook.Path & "\Test Map\" Filename = Dir(Pathname & "*") Do While Filename <> "" Filename = Left(Filename, InStr(Filename, ".") - 1) Set mFind = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Find(Filename) If Not mFind Is Nothing Then mFind.Offset(0, 1).Value = "x" Filename = Dir() Loop End Sub
Best regards,
Trowa
Jun 22, 2021 at 07:18 AM
I actually have my filenames without extensions. Will that work?