I 'm trying to include a step in a macro to find the row in col C where a known date occurs. There's only one location on a particular worksheet.
I've researched this issue here and else where but haven't succeeded in solving the problem!
I'm using a date format d/mm/yyyy for data entry so today is 28/07/2024 but the display is 28 Jul 24.
Dim latestreaddate As Date
latestreaddate = Format(latestreaddate, "Short Date") ' this line correctly identifies 20/06/2024 from my ws
Set FoundCell = Range("C:C").Find(What:=DateValue(latestreaddate), LookIn:=xlValues) 'but this line says FoundCell =Nothing
As ever, would be grateful for some help here.
thanks
Geoff
I've researched this issue here and else where but haven't succeeded in solving the problem!
I'm using a date format d/mm/yyyy for data entry so today is 28/07/2024 but the display is 28 Jul 24.
Dim latestreaddate As Date
latestreaddate = Format(latestreaddate, "Short Date") ' this line correctly identifies 20/06/2024 from my ws
Set FoundCell = Range("C:C").Find(What:=DateValue(latestreaddate), LookIn:=xlValues) 'but this line says FoundCell =Nothing
As ever, would be grateful for some help here.
thanks
Geoff