Hello,

I need to search through a directory for the correct file according to the date in the cell.

Looping through column A, if a string = "GB", then string A is the (0, 1) offset which is the date.
The "sched_Jan_May.xls" opens in the H: directory and finds the correct date etc.

I have all of that working correctly. The dilemna is when there are 2 files in the same directory,
e.g. sched_Jan_May.xls and sched_June_September.xls.....
If the string A, which is the date is not found in the first file, how can I open the second file?
Also - I need to exit if found in the first file
I can't depend on which was modified last b/c they both are being constantly updated.



Here is a sample of the code I have so far:



  If InStr(cel.Value, "GB") Then
       a = cel.Offset(0, 1)
       'b = Format(a, ("dd-mmm"))
       x = True
    Else
    End If
    
    If x = True Then
    
       k = "POC"
       i = 1
       j = 1
          
       Workbooks.Open("sched_Jan_May.xls")       
       Worksheets("Schedule").Select