Hi
I have a master workbook that opens another workbook. On the opened workbook, there is a date.
I want to find the column in the master workbook that contains this date and I'm having an issue with the following line of code:
Report_Filename is the master workbook. WeekEndingDate is taken from the opened workbook. It's actually a date extracted from a text string so I did this:
I believe DateValue is the correct thing to use to turn the text version of the date into a real date value.
The Range("Setup_DatesList") is a named range of dates that are derived from formulas rather than actual input, but I don't believe this should be causing the problem.
I'm getting the standard runtime error 1004, unable to get the Match property of the WorksheetFunction class.
Can anyone tell me what I'm doing wrong?
Thanks
Liam
I have a master workbook that opens another workbook. On the opened workbook, there is a date.
I want to find the column in the master workbook that contains this date and I'm having an issue with the following line of code:
Code:
Week_Column = Application.WorksheetFunction.Match(WeekEndingDate, Workbooks(Report_Filename).Sheets("Sheet1").Range("Setup_DatesList"), 0)
Report_Filename is the master workbook. WeekEndingDate is taken from the opened workbook. It's actually a date extracted from a text string so I did this:
Code:
WeekEndingDate = DateValue(Mid(FindText, Application.WorksheetFunction.Find(",", FindText) - 10, 10))
I believe DateValue is the correct thing to use to turn the text version of the date into a real date value.
The Range("Setup_DatesList") is a named range of dates that are derived from formulas rather than actual input, but I don't believe this should be causing the problem.
I'm getting the standard runtime error 1004, unable to get the Match property of the WorksheetFunction class.
Can anyone tell me what I'm doing wrong?
Thanks
Liam