Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Why not work... (2000 sr 1)

    I am sure into range G:G is present "OI24683"

    Sub ALREDAY()
    Dim rng As Range
    Dim TEST_MATR As String
    TEST_MATR = "OI24683"
    Set rng = Sheets("STORICO").Range("G:G").End(xlDown).Find( _
    What:=TEST_MATR, LookIn:=xlValues, LookAt:=xlWhole)
    If Not rng Is Nothing Then
    MsgBox "ALREADY PRESENT"
    Exit Sub
    End If
    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Why not work... (2000 sr 1)

    What is the End(xlDown) for?

    You are testing for the value <code>OI24683</code>. Are you sure that the value isn't <code>OL24683</code> or <code>0I24683</code> with the digit 0 (zero) instead of the letter O or something like that?

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Why not work... (2000 sr 1)

    Sorry...SOLVED!!!!
    I am stupid used wrong range... now work fine.
    Tks.

Posting Permissions

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