+ Reply to Thread
Results 1 to 6 of 6

Search button to search different sheet in same workbook

  1. #1
    Registered User
    Join Date
    12-01-2016
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    3

    Search button to search different sheet in same workbook

    Hi guys,

    I'm very new to excel, with a fairly loose grasp on the basics of VBA.

    The problem i have is that i have two sheets within the same workbook (call them A and B) both have a lot of different fields and information.

    I need a way, preferably a button, to search the selected value (xxx) in A against the masterlist in B. so for instance if the xxx value in A was 'RED CARS' i could highlight that, press the button and have a search function for incidents of 'RED CARS' in B.

    As i said my knowledge is limited at best so any help at all would be appreciated.

    Thanks and kind regards,

    Louis

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Search button to search different sheet in same workbook

    What do you want to do when you find the " incidents of 'RED CARS' in B"
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    12-01-2016
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    3

    Re: Search button to search different sheet in same workbook

    Ideally highlight it, but just having it at the top of the page would be an infinite improvement

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Search button to search different sheet in same workbook

    In which column in sheets A and B will 'RED CARS' be found? Can I assume that there will be multiple occurrences of 'RED CARS'? It would be easier to help and test code if we could work with your actual file. Could you post a copy of your file with a detailed explanation of what you want to achieve using a few examples?

  5. #5
    Registered User
    Join Date
    12-01-2016
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    3

    Re: Search button to search different sheet in same workbook

    unfortunately, do to the nature of the information i cant post it here. in sheet A the information could be anywhere in the spreadsheet, its cross referencing it with sheet B that's important in sheet B there will only ever be one occurrence and it will always be in column A

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Search button to search different sheet in same workbook

    Rather than clicking on a button, the macro will automatically run when you double click the cell in sheet A that you want to find on sheet B. If you want to click on a button to run the macro, please let me know and I will modify it. Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet A and click 'View Code'. Paste the macro into the empty code window that opens up. Change the sheet names to suit your needs. Close the code window to return to your sheet. Double click any cell in Sheet A.
    Please Login or Register  to view this content.

+ 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. Macro button search and copy to different sheet
    By richlilrich in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-13-2016, 11:15 AM
  2. Search Bar that Executes Search Based on Radio Button and Key Words
    By pomo2016 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2016, 09:26 AM
  3. [SOLVED] userform search button remove search only when i type
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2014, 02:32 AM
  4. [SOLVED] Populating a userform from a search button and editing the workbook
    By jonesdwj in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-16-2013, 01:55 AM
  5. [SOLVED] Macro/s to create Search Bar to filter to search terms entered activated by Command Button
    By JasonRay in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-08-2013, 03:44 PM
  6. Replies: 1
    Last Post: 10-18-2012, 05:52 AM
  7. Search entire workbook with control button
    By lock-e73 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-27-2008, 03:27 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