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

    Who is the best instruction? (2000 sr 1)

    Set Found_ID = Sheets("L0755").Columns("M:M").Find(ID, lookat:=xlWhole)
    Set Found_ID = Sheets("L0755").Columns("M:M").Find(ID, LookIn:=xlFormulas)

    The column M is General format.
    (I change the format of this column if you suggest me another solution)
    ...sorry good evening Hans.;-)

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

    Re: Who is the best instruction? (2000 sr 1)

    You cannot say that one is "better" or "worse" than the other. LookAt and LookIn specify two different aspects of the search.

    LookAt specifies whether Find must look for ID as the complete formula or value of the cells, or as a part.
    LookIn specifies whether Find must look at the cell value or at the cell formula.

    Example: you are looking for 13 in a cell with formula =D13-E14. The cell displays the value 27. Result:

    <table border=1><td>LookAt</td><td>LookIn</td><td>Found?</td><td>xlWhole</td><td>xlFormula</td><td>No</td><td>xlPart</td><td>xlFormula</td><td>Yes</td><td>xlWhole</td><td>xlValue</td><td>No</td><td>xlPart</td><td>xlValue</td><td>No</td></table>
    As you see, you can combine LookAt and LookIn in one instruction.

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

    Re: Who is the best instruction? (2000 sr 1)

    Good explain....
    Is normal for a Teacher.
    Tks Hans.

Posting Permissions

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