+ Reply to Thread
Results 1 to 7 of 7

VBA: Search cell value multiple sheets, then activate sheet

  1. #1
    Forum Contributor
    Join Date
    04-11-2014
    Location
    Norway
    MS-Off Ver
    Office 365 version 2302
    Posts
    152

    VBA: Search cell value multiple sheets, then activate sheet

    Hi all,

    I have a workbook with multiple sheets. Every sheet has a header with unique numbers. To find an exact number I have to browse every sheet manually to find it.
    I've managed to find this selecting all sheets and then use "Find & Select", but is it a way to do this using VBA?

    I would like to enter the word I will search for in cell H2 in the first sheet, and then when I run macro, Excel will activate the sheet where the word is found.

    I guess this is kind of easy to do, but I couldn't find a solution..


    Thanks
    Last edited by goranimo; 07-06-2016 at 07:39 AM.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search cell value multiple sheets, then activate sheet

    Please Login or Register  to view this content.
    ^This will only pick up the first occurrence of the term per worksheet
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA: Search cell value multiple sheets, then activate sheet

    Please Login or Register  to view this content.
    slight amendment
    this will select the last sheet with search term

  4. #4
    Forum Contributor
    Join Date
    04-11-2014
    Location
    Norway
    MS-Off Ver
    Office 365 version 2302
    Posts
    152

    Re: VBA: Search cell value multiple sheets, then activate sheet

    Thanks, this isn't quite what I'm looking for.

    I want to put what i'm searhing for in cell H2. When I run the macro I want the sheet that contain the item I'm searching for to be activated.

    If i have 5 sheets, i.e Index, Sheet 1, Sheet 2, Sheet 3, Sheet 4, Sheet 5.
    Let's say that the word "Hello" is anywhere in Sheet 3.

    When I enter "Hello" in cell H2 in Index and run the macro, then Sheet 3 will be activated.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA: Search cell value multiple sheets, then activate sheet

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-11-2014
    Location
    Norway
    MS-Off Ver
    Office 365 version 2302
    Posts
    152

    Re: VBA: Search cell value multiple sheets, then activate sheet

    Thanks! Works!

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA: Search cell value multiple sheets, then activate sheet

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. [SOLVED] Search multiple sheets and copy results to new sheet
    By augr in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-18-2014, 06:43 PM
  2. Search value in multiple sheets and return sheet name(s)
    By evolv12 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-07-2013, 02:11 PM
  3. Search for Multiple String Values on Multiple Sheets and Copy Rows to New Sheet
    By rrtikker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2012, 12:21 PM
  4. Replies: 0
    Last Post: 03-05-2009, 01:43 PM
  5. [SOLVED] Search multiple sheets, then paste results in new sheet
    By Paul M in forum Excel General
    Replies: 1
    Last Post: 01-08-2006, 03:30 PM
  6. Search multiple sheets, then paste results in new sheet
    By Paul M in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2006, 03:30 PM
  7. [SOLVED] search all sheets in book to find value and activate sheet with va
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2005, 04: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