is it possible to find substring in excell's column of dates?
range.find("01", , xlFormulas, xkpart) - works, but
range.find("01.07", , xlFormulas, xkpart) - doesn't
range.find("01.07.03", , xlFormulas, xkpart) - doesn't
Printable View
is it possible to find substring in excell's column of dates?
range.find("01", , xlFormulas, xkpart) - works, but
range.find("01.07", , xlFormulas, xkpart) - doesn't
range.find("01.07.03", , xlFormulas, xkpart) - doesn't
Try setting the LookIn property to xlValues, this should work.
xlValues doesn't work!
Did it give you an error or just did the same thing?
i use
columns(1).find("01.07", , xlvalues, xlpart)
it returns Nothing
I have been using this with some test data and find the problem you do....
Interesting though.... if you search for day/year ...ie 21/03 it returns results in my case 21/01/03... maybe this is a bug in the search function? It seems to work OK when using excel's built in one.... could it be to do with the date formats??? Quite confusing anybody else have any ideas?Code:Public Function FindInCells(ByVal data As String) As String
On Error Resume Next
Dim rng As Range
Set rng = Cells.Find(data, , xlValues, xlPart)
FindInCells = rng.Value
End Function