Results 1 to 5 of 5

Thread: search in excel

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Posts
    26

    Question

    I want to make a search for a number or a string in excel. Is there anyone who can help me? Regards. Clint

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Code:
    'this code assumes you have declared and created the
    'Excel.Application object and called it xl
        xl.Cells.Find(What:="TheStringToSearchFor", _
         After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
         xlPart, SearchOrder:=xlByRows, _
         SearchDirection:=xlNext, MatchCase:=False).Activate
    Good luck!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Posts
    26

    Smile thanks Joacim

    thank you very much. you are great.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Posts
    26

    joacim can u?

    joacim, could u please show me how to declare variables such as ActiveCell? When I run the code, it gives "variable not defined" error message.

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Sorry it should say: xl.ActiveCell
    ActiveCell is a property of the Excel.Application object.

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