Consulting

Results 1 to 5 of 5

Thread: A Simple search

  1. #1
    VBAX Regular
    Joined
    Dec 2006
    Posts
    20
    Location

    Unhappy A Simple search

    I am trying to implement a simple search in my spreadsheet, at the moment the workbook has 8 sheets, 1 menu page and then 7 sheets of which have the same table headings but are split by location. I want to be able to search the ID column in the 7 data sheets, either from a cell which the user would type into on the menu page or ideally a dialog box, and find which sheet contains the ID and simply make that the active cell.

    Also if possible, I would like the results from the search to be displayed in a form (database style) for editing so only that row is changeable.
    Ideally I would have made a database for the whole thing, but the guys who will be using this don't have access to database software.

    Sorry for all the questions but I am well out of my depth. I have attached the workbook so feel free to play around and change what ever as I have a copy, or let me know if any of my requests are possible?

    Thanks guys this will be so useful

    ps. Please let me know if this makes no sence or needs more examples
    Last edited by james123; 12-18-2006 at 04:26 PM.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi James,
    Welcome to VBAX
    I've attached a Userform with a few textboxes to your Go button. Let us know how you get on
    regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Regular
    Joined
    Dec 2006
    Posts
    20
    Location
    wow, that's cool thank you so much!
    A quick few question,
    1) is it possible to auto press the search button on the form?
    2) How would I add more fields to the form?
    Thanks so much for your help

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    1) Yes. The button macro can be moved to the Initialise code

    2) Open the VB Editor (Alt + F11) and select the userform. Find the Toolbox and draw the textboxes and labels as required. Use the Properties window to check/change the textbox names.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    VBAX Regular
    Joined
    Dec 2006
    Posts
    20
    Location
    thank you!

    Any other questions and i know were to ask

Posting Permissions

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