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

    find method... (2000 sr-1)

    I use this piece of code to find a dupes value in column, but it not work correct.....
    INDEX = CONTRATTO & "-" & SOC_1 & "-" & STATO_1 & "-" & AGENZ & "-" & DATA_CTR
    Set Found_INDEX = Sheets(ELENCO).Columns("R:R").Find((INDEX), lookat:=xlWhole)
    If Found_INDEX Is Nothing Then

    in effect if you see the images the code skip the value but it existis in column R, see in commented line the value tath i have in column R...
    note column R is General
    index is a var dim as string

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

    Re: find method... (2000 sr-1)

    Does it make a difference if you change the line to

    Set Found_INDEX = Sheets(ELENCO).Columns("R:R").Find((INDEX), LookAt:=xlWhole, LookIn:=xlValues)

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

    Re: find method... (2000 sr-1)

    ok i test tomorrow...
    but... i have see in a searching in other post on forum and i have see the command:

    If Found_INDEX Is Nothing Then

    incapsuled with parenthesis wath change?

    If (Found_INDEX Is Nothing) Then

    pearpf is this the correct sisryax?

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

    Re: find method... (2000 sr-1)

    No, that doesn't matter. The lines

    If (Found_INDEX Is Nothing) Then

    and

    If Found_INDEX Is Nothing Then

    are equivalent.

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

    Re: find method... (2000 sr-1)

    ok... tks for the explain.

Posting Permissions

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