Results 1 to 6 of 6

Thread: find in date-column

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    Moscow, Russia
    Posts
    10

    Question find in date-column

    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

  2. #2
    Hyperactive Member -=XQ=-'s Avatar
    Join Date
    Mar 2002
    Location
    Liverpool, England, UK
    Posts
    278
    Try setting the LookIn property to xlValues, this should work.
    See ya later,

    -=XQ=-

    "Reality is merely an illusion, albeit a very persistent one. "
    - Albert Einstein (1879-1955)
    This is the coolest site ever!!!

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    Moscow, Russia
    Posts
    10

    doesn't work

    xlValues doesn't work!

  4. #4
    Hyperactive Member -=XQ=-'s Avatar
    Join Date
    Mar 2002
    Location
    Liverpool, England, UK
    Posts
    278
    Did it give you an error or just did the same thing?
    See ya later,

    -=XQ=-

    "Reality is merely an illusion, albeit a very persistent one. "
    - Albert Einstein (1879-1955)
    This is the coolest site ever!!!

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    Moscow, Russia
    Posts
    10

    It finds nothing

    i use

    columns(1).find("01.07", , xlvalues, xlpart)
    it returns Nothing

  6. #6
    Hyperactive Member -=XQ=-'s Avatar
    Join Date
    Mar 2002
    Location
    Liverpool, England, UK
    Posts
    278
    I have been using this with some test data and find the problem you do....
    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
    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?
    See ya later,

    -=XQ=-

    "Reality is merely an illusion, albeit a very persistent one. "
    - Albert Einstein (1879-1955)
    This is the coolest site ever!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width