Hi All,
I am attempting to use VBA to search a directory for files that contain certain text and yesterdays date in the file name (date format is dd-mmm-yyyy, work days only ideally) and paste into the current workbook.
Have found similar threads here but not quite the same and after countless videos and attempts I am asking the experts
Thanks in advance.
I am attempting to use VBA to search a directory for files that contain certain text and yesterdays date in the file name (date format is dd-mmm-yyyy, work days only ideally) and paste into the current workbook.
Have found similar threads here but not quite the same and after countless videos and attempts I am asking the experts
All of the source files are in the same directory G:\Data\Prices
Current workbook where the data should be copied to is called Master.xlsm and is in G:\All\Masterfiles
If the file name contains the text "Warning" and yesterdays date then copy to the current workbook in tab "Check" in cell A1
If the file name contains the text "Direct" and yesterdays date then copy to the current workbook in tab "Exposure" in cell A2 (has a heading in row 1 so needs to be from A2)
Any assistance is much appreciated, even a link to a similar example would be helpful.Thanks in advance.