0
votes

The following line is returning a type mismatch error.

If ((Export_Date_Min < CDate(Source_Index.Offset(0, -6))) & ((Export_Date_Max > CDate(Source_Index.Offset(0, -6))))) Then
' Do Something

Export_Date_Min and Export_Date_Max are both Date Variables

Source_Index.Offset(0,-6) is a Range, however when prefixed with CDate returns a Date Variable as the cell contains a date.

I used TypeName() to check that all variables being compared are of type Date.

Any help appreciated.