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

If you have a lot of worksheets in an Excel workbook and you are navigating google for a quick way to find a specific sheet or all sheet names, then you are in the right place! In this article, we will discuss 2 effective methods to search by sheet name in an Excel workbook with proper illustrations.


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

In this section, we will learn 2 methods to search worksheet names in an Excel workbook with proper illustrations and explanations.

1. Right-click on the Navigation Button to Find the Sheet Name

You will find the Navigation button of your Excel workbook just above the Status bar.

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

Steps:

  • Right-click on the Navigation button of your Excel workbook.
  • You will see a dialog box that contains all sheet names in your Excel workbook. Now choose the specific sheet that you need, and finally press OK.

This will navigate you to the selected sheet.


2. Use VBA Code to Search Sheet Name in an Excel Workbook

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

2.1 Search with VBA and Navigate from Sheet Name List

Here, the VBA code will list all the sheet names in the Excel workbook. In this section, we will learn how we can get the list of all the sheet names in the Excel workbook by using VBA code. For this, you just have to follow the steps below.

Steps:

  • First, go to the Developer tab.
  • Then click on the Visual Basic option from the Developer tab and a VBA window pops out.

Or, if you press Alt+F11 keys together, a VBA window will pop out.

  • Click on the Insert tab of the menu bar of the VBA window.
  • Then click on Module.

  • Now, 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 on Run of the menu bar or press F5 to execute the VBA code.

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

  • Now for jumping to your required sheet, you can assign a hyperlink to these sheet names. Continue to follow the steps to add a hyperlink to each one of the sheets.
  • Right-click on your opted sheet name.
  • Go to the Link option > 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, it will take you to the corresponding worksheet.


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. You have to type the sheet name in the search box and the code will take you to your desired sheet!

Steps: 

  • First of all, go to the Developer tab. Then click on the Visual Basic button.
  • Then go to the Insert tab and select Module.
  • It will open a new Module window in which you have to paste the following VBA code.

If you don’t have the Developer tab in your Excel application, enable it, or press Alt+F11. This will directly open a new module window.

  • Now copy the following VBA code and paste it into the module.
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

  • Then, by clicking the Run button on the menu bar of the Visual Basic tab or pressing F5, a sheet search box will pop up.
  • Write down the sheet name that you need to find, and click OK.

Search Sheet Names in Excel Workbook 7

  • Another dialog box will pop up and it will tell you whether the sheet has been found or not. You need to close it.

Search Sheet Names in Excel Workbook 8

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


Download Practice Workbook

You can download the following Excel workbook for your practice.


Conclusion

This article discussed how to search sheet names in an Excel workbook with and without VBA codes. I hope you found this tutorial helpful. You can visit our website to learn more Excel-related content. Please, drop comments, suggestions, or queries if you have any in the comment section below.


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