How to Search by Sheet Name in Excel Workbook (2 Handy Methods)

Method 1 – Right-click the Navigation Button

The Navigation button can be found just above the Status bar.

In an Excel workbook containing many sheet names, you can quickly find the sheet you want using this button.

Steps:

  • Right-click on the Navigation button.
  • A dialog box that contains all sheet names in your Excel workbook opens.
  • Select the specific sheet that you need.
  • Click OK.

This will navigate you to the selected sheet.


Method 2 – Use VBA Code

You can easily find sheet names by using certain VBA macros.

2.1 – Search with VBA and Navigate from Sheet Name List

Using this method, the VBA code will fetch the list of all the sheet names in the Excel workbook.

Steps:

  • Click on the Developer tab.
  • Click Visual Basic option (or Alt+F11 on your keyboard). A VBA window pops out.
  • Click the Insert tab on the menu bar of the VBA window.
  • Click on Module.

  • Copy the following VBA code and paste it into the Module window.
Sub List_SheetNames() 
 Columns(1).Insert 
 For i = 1 To Sheets.Count 
  Cells(i, 1) = Sheets(i).Name 
 Next i
End Sub 
  • Click Run on the menu bar (or press F5 on the keyboard) to execute the VBA code.

This will create a list of all worksheet names in your current sheet.

To enable jumping to your required sheet, assign a hyperlink to these sheet names.

Steps:

  • Right-click on your desired sheet name.
  • Click the Link option from the context menu, then Insert Link.

Search Sheet Names in Excel Workbook 4

  • Select Place in this Document.
  • Select your specific sheet.
  • Press OK.

Now if you click on the links created, the corresponding worksheet will open.


2.2 – Search by Typing the Sheet Name in the Input Box

This VBA code will provide you with a search box using the InputBox feature. Enter the required sheet name in the search box and the code will take you to your desired sheet.

Steps: 

  • Click the Developer tab.
  • Click Visual Basic option (or Alt+F11 on your keyboard). A VBA window pops out.
  • In the VBA window, click the Insert tab and select Module. A new Module window opens.
  • Copy the following VBA code and paste it into the Module window.
Sub Search_SheetName() 
Dim Name As String 
Dim Found As Boolean 
Name = InputBox("Enter sheet name:", "Sheet search") 
If Name = "" Then Exit Sub 
On Error Resume Next 
ActiveWorkbook.Sheets(Name).Select 
Found = (Err = 0) 
On Error GoTo 0 
If Found Then 
MsgBox "Sheet '" & Name & "' found and selected!" 
Else 
MsgBox "The sheet '" & Name & "' not found!" 
End If 
End Sub

Search Sheet Names in Excel Workbook 6

  • Click the Run button on the menu bar of the Visual Basic tab (or press F5 on your keyboard).
  • A sheet search box pops up.
  • Enter the sheet name that you want to find.
  • Click OK.

Search Sheet Names in Excel Workbook 7

  • Another dialog box will pop up, informing whether the sheet has been found or not.
  • Click OK to close it.

Search Sheet Names in Excel Workbook 8

Note:
This VBA code requires an exactly matched sheet name.


Download Practice Workbook


Related Articles


<< Go Back to Excel Sheet Name | Excel Worksheets | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Hafizul Islam
Hafizul Islam

Hafizul Islam is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo