MatthewBell
Technical User
Hi there.
Long time no thread. But i'm stuck again.
I have an array that has been filled with strings. They are the result of an:
Application.FileSearch.FileName = Blah\blah\blah\*.xls
The wildcard means I get hundreds of FoundFiles.
The bit that the wildcard represents is a string containing an ID number and a date.
What I need to do is somehow sort through the column in the array and extract the date portion of the string, CDate it to make it comparible and then compare the dates of Files with matching ID numbers. I then want to move all but the most recent file for each ID Number to a different folder.
Im fairly good with extracting the bits of string I need and I could put the date bit and the ID number bit in their own columns so all I really need to know is how to extract the duplicate entries in the ID column, compare the dates and move the files.
I could probably extract the duplicate entries with a loop to search through and check for matches but that would be slow with so many rows in the array and it gets run everytime the workbook is updated (often) so I was hoping there would be a command that returns the duplicate entries.
Can anyone help.
Many thanks
Matt![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
Long time no thread. But i'm stuck again.
I have an array that has been filled with strings. They are the result of an:
Application.FileSearch.FileName = Blah\blah\blah\*.xls
The wildcard means I get hundreds of FoundFiles.
The bit that the wildcard represents is a string containing an ID number and a date.
What I need to do is somehow sort through the column in the array and extract the date portion of the string, CDate it to make it comparible and then compare the dates of Files with matching ID numbers. I then want to move all but the most recent file for each ID Number to a different folder.
Im fairly good with extracting the bits of string I need and I could put the date bit and the ID number bit in their own columns so all I really need to know is how to extract the duplicate entries in the ID column, compare the dates and move the files.
I could probably extract the duplicate entries with a loop to search through and check for matches but that would be slow with so many rows in the array and it gets run everytime the workbook is updated (often) so I was hoping there would be a command that returns the duplicate entries.
Can anyone help.
Many thanks
Matt
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)