Results 1 to 3 of 3

Find/Search code tweak help - Hopefully simple :)

Threaded View

  1. #1
    Registered User
    Join Date
    04-02-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    19

    Find/Search code tweak help - Hopefully simple :)

    Hi all,

    I'm looking for a bit of help. I found this item of code on the web but need to modify it ever so slightly.

    The code below will locate and select cells containing Kenny. What I want to do is create a little search cells(C5) on my spreadsheet and have the code reference whatever is typed into the search cell. I'm sure it's a simple adjustment. I've tried changing the What:="Kenny" to What:="=C5" & What:=C5 all without success.

    Sub find()
    Cells.find(What:="Kenny", After:=ActiveCell, LookIn:=xlValues, LookAt _
    :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
    True).Activate
    End Sub
    Any thoughts? The code appears to do what I need but maybe there is a better way?

    V new at this stuff so any help appreciated.

    Regards.
    Last edited by valius; 06-12-2009 at 02:10 PM. Reason: Solved by ChemistB

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1