+ Reply to Thread
Results 1 to 3 of 3

Creating a search bar using VBA

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    88

    Creating a search bar using VBA

    Hi there

    I'd like to create a search bar where someone types text into a field in Sheet1 (in the sample B1), then clicks a macro button to search for that word in Sheet2.

    The result should be that the cell containing that word is where you end up.

    The search word shouldn't be an exact match for the result, the cell just needs to contain it.

    The search bar should also be present on Sheet2, with an additional button for Find Next, so that the user can move to the next result if the first one is not what they're looking for.

    I've managed to create a search function with a pop up box using the below but this isnt as effective.

    Any help much appreciated as ever!

    Thanks

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Lightbulb Re: Creating a search bar using VBA

    May I suggest you create a UserForm instead of using the InputBox. A UserForm will stay 'alive/present' between sheets and you can easily provide a 'find next' button on it.

  3. #3
    Registered User
    Join Date
    04-30-2012
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    88

    Re: Creating a search bar using VBA

    Taht's great, thnaks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Creating search box in cell - Currently using Macro 'Range to search' *HELP*
    By jacko058 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2014, 05:24 AM
  2. Replies: 0
    Last Post: 03-05-2009, 01:43 PM
  3. Creating a search Dialog box
    By jwbeaty in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-04-2008, 06:03 PM
  4. Creating Search Bar
    By kiany406 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-28-2007, 03:21 PM
  5. [SOLVED] Creating a complex search
    By echo_park in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-04-2006, 06:50 AM

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