Can find sheets in excel

I have a excel file with 55 sheets in it

It is very tedious to find a specific sheet name in the excel file since it has 55 sheets in it

I have used the search function to find specific sheet name but it is not searching the sheet name

Is there a way to search a Sheet name in Excel

asked Apr 16, 2014 at 7:08

Santhosh Siddappa's user avatar

In 2013… RIGHT CLICK on the Navigation area in the STATUS BAR (far left area with buttons) and the sheet names will appear and you can choose whichever you want to activate. Joan B

answered Oct 9, 2014 at 3:19

Joan B's user avatar

The build in search function in Excel does not allow you to search in the names of the sheets. You could instead include the code bellow as a macro in either the actual workbook or as a Add-In to your Excel installation.

When this code is called it will prompt you for a search name and try to find and select the sheet with that name.

Sub SearchSheetName()
    Dim sName As String
    Dim sFound As Boolean

    sName = InputBox(prompt:="Enter sheet name to find in workbook:", Title:="Sheet search")

    If sName = "" Then Exit Sub
    sFound = False

    On Error Resume Next
        ActiveWorkbook.Sheets(sName).Select
        If Err = 0 Then sFound = True
    On Error GoTo 0

    If sFound = False Then
        MsgBox prompt:="The sheet '" & sName & "' could not be found in this workbook!", Buttons:=vbExclamation, Title:="Search result"
    End If
End Sub

answered Apr 16, 2014 at 8:17

Netloh's user avatar

NetlohNetloh

2542 silver badges7 bronze badges

2

You can use VBA to create a list of all of the worksheets in your workbook automatically.

If you insert this code into the VB panel for your workbook, then go back to your workbook and make a blank sheet and run this as a macro:

Sub SheetNames()
    Columns(1).Insert
    For i = 1 To Sheets.Count
        Cells(i, 1) = Sheets(i).Name
    Next i
End Sub

This should then create a full list of all of your worksheets. You could also then assign a hyperlink to each one to jump to that sheet easily if you wanted.

answered Apr 16, 2014 at 7:59

Matt_Roberts's user avatar

Quickest to run a simple test as below

Sub Tested()
Dim strTest As String
strTest = "Your Sheet Name"
MsgBox strTest & "exists:= " & SheetExists(strTest)
End Sub

Function SheetExists(ByVal strTest As String) As Boolean
Dim ws As Worksheet
On Error Resume Next
Set ws = ActiveWorkbook.Sheets(strTest)
SheetExists = (Not ws Is Nothing)
End Function

answered Apr 16, 2014 at 11:16

brettdj's user avatar

brettdjbrettdj

2,09720 silver badges23 bronze badges

If you do these repetitive tasks in Excel:

  • Searching for worksheets and navigating to them.
  • Hiding and unhiding sheets.
  • Copying and renaming sheets.
  • Protecting and unprotecting sheets.
  • Moving, organizing, and coloring sheets.
  • Flipping back and forth between two sheets.

Then there is a solution that will help save you a lot of time…

Finding Sheets in a Workbook can be Time Consuming

Do you ever work with Excel files that contain more than 5 or 10 worksheets?

If so, you probably find yourself spending extra time navigating through these workbooks.

Especially when you are in a meeting, or someone is looking over your shoulder.  Have you ever said these words when looking for a sheet in your workbook, “Hold on boss, I know it’s here somewhere…”?

Just finding a worksheet in a large workbook can be a frustrating and time consuming task.

You have to scroll horizontally across the tab names at the bottom of the screen.  And you either click the scroll arrows repeatedly with the mouse, or press the Ctrl+Page Up/Page Down keyboard shortcuts.

Spend Too Much Time Scrolling Worksheets Excel

We Spend Too Much Time Doing Repetitive Tasks

What about common everyday processes like:

  • Hiding & unhiding sheets
  • Copying & renaming sheets
  • Protecting & unprotecting sheets
  • Moving, organizing, coloring sheets, etc.

Do you feel like you spend extra time doing any of the above?

If so, you’re not alone.

These are common tasks we do every day, but they are not always easy to perform.  Often times you will find yourself doing the same repetitive task over and over again, just to produce the same result as last week or last month.

Cant Unhide Multiple Sheets

Excel is an amazing tool, and it can be very fun and exciting to use.  But these repetitive tasks are NOT the fun part.  They take time away from your overall mission of finding and analyzing results to help make better business decisions.

Producing Results is the Most Important Part of Your Job

Your job is important and you are probably responsible for adding a lot of value to your organization through you work.  Whether you are  scrubbing data or creating complex financial models and dashboards, you are helping your organization succeed.

The more time you spend producing the results, the greater the impact you will have in your organization and your career.  But spending time doing common repetitive tasks like, “unhiding 10 sheets for this month’s reporting package”, takes time away from other tasks that are more important (and fun).

So how do we spend more time doing the fun stuff that will help others, and less time doing the boring repetitive stuff?

Well, I’m going to show you a few tools that will save you a lot of time with these common processes.  Tools that are very easy to use…

We Need a Faster Way…

Jon Acampora Circle MVP Profile

My name is Jon and I use Excel all day, every day.

I love Excel! 🙂

I spend so much time using it that Microsoft recently awarded me with their MVP award.  Well, I think they actually gave me the award for helping others learn how to use Excel.  But either way, I spend a lot of time using Excel.

Since I spend so much time using Excel, I strive to use it in the most efficient way possible.  If you read my blog then you know I focus on saving time and being productive.  I want to get my work done as quick as possible so I can spend time enjoying life with my family and loved ones.

One thing I’ve always found challenging in Excel is navigating to a specific worksheet in a workbook.  Especially when this workbook contains a lot of sheets.  It’s difficult to find a worksheet and then navigate to it.  Excel does NOT have a built-in search feature for this.

So I decided to create a tool that would solve this problem.

I wanted a way to quickly search for a worksheet and then jump to it.  It needs to be as simple as performing a Google search;  just type the sheet name in a box to search for it, select the sheet from a list of results, and then jump that sheet.  Sounds simple right?  Well now it is…

The tool I built to do this is Tab Hound.

Tab Hound Logo - ExcelCampus.com
Tab Hound Button and Window for Excel

Tab Hound is an add-in for Excel that will save you a ton of time with your everyday worksheet tasks.  It is packed with features that automate common processes, and help you get your job done quickly.

Quickly Search and Jump To Worksheets with Tab Hound

Tab Hound Window v1 - Search Feature

Tab Hound makes it extremely fast and easy to find any sheet in your workbook and jump right to it.

I wanted a way to perform this search without touching the mouse.  Simply press a keyboard shortcut, type the name of the sheet I’m looking for, then press enter to go to that sheet.  Tab Hound makes this possible whether you’re a keyboard or mouse user.  Either way, it’s lightning fast!

Searching sheet names was originally the main purpose behind Tab Hound.  But it has turned into so much more…

Tab Hound Makes it FAST & EASY to Perform Common Tasks

I also wanted a way to automate other time consuming tasks like:

  • copying and renaming sheets,
  • copying sheets to a new workbook,
  • unhiding multiple sheets at the same time, etc.

These are tasks we all do frequently, and they require multiple steps to complete.

Did you know Excel requires six mouse clicks to copy a sheet to a new workbook?

That’s a lot of steps for such a simple task.  And mouse clicks are time consuming because you are required to move the mouse to a new location for each of those clicks.  If you are using a laptop trackpad, then this process can be very slow.

So I quickly started adding buttons to Tab Hound to automate these processes.

Tab Hound Window v1 - Buttons Automate Common Tasks

I added buttons to:

  • Hide or Unhide multiple sheets at the same time.
  • Copy & rename sheets.
  • Copy sheets to a new workbook.
  • Jump to the first or last sheet.
  • Move sheets up, down, first, or last.
  • Delete sheets.
  • Protect and Unprotect sheets.
  • Flip Back and forth between two sheets.

I also added a Stats Bar and Filters to help answer questions about my workbooks:

  • How many worksheets are in this workbook?
  • How many hidden sheets?
  • How many sheets with a specific tab color?
  • Show me all my sheets that have a specific tab color.
  • Show me all my hidden sheets that have the word “jan” in the sheet name.

All these simple requests became possible with Tab Hound.

Tab Hound Saves You Time and is VERY EASY to Use

The next thing I focused on was making Tab Hound easy to use.

Tab Hound will change how you work with the worksheets in your workbooks.  It will save you a lot of time.  And it does so by being very easy to use.

It makes these processes faster and easier to perform than doing them the way you normally would in Excel.

Copying and Renaming Sheets Becomes a Simple Task

For example, imagine if you had to teach a new co-worker how to copy and rename a sheet.  You would instruct them to do something like the following:

  1. Right click the tab name.
  2. Select Move or Copy… from the list.
  3. Select the sheet you want to place the copy before from the list.
  4. Click the create a copy check box.
  5. Click Ok.
  6. Double-click on the tab name
  7. Type a new name for the sheet and press enter.

That’s a lot of steps to learn and remember for a newbie.

With Tab Hound, here is how you would instruct your co-worker to copy and rename a sheet.

  1. Right-click the Tab.
  2. Select Copy and Rename.
  3. Type a new name in the box that automatically appears and press Enter.

Tab Hound Right Click Menu

As you can see there are half as many steps with Tab Hound.  All steps can be done with keyboard shortcuts or the mouse.  And you can copy & rename multiple sheets with the help of Tab Hounds filters to make this process even faster.

The point is that Tab Hound will not only save you time, but it is also very easy and intuitive.

Your workbooks will become more organized, easier to manage, and easier for others to use and understand.

Add a Table of Contents to Your Workbooks

Speaking of making it easier for the readers or consumers of your workbooks…  Tab Hound also includes a Table of Contents feature.

Tab of Contents with Tab Hound

With a click of a button, you can quickly add a Table of Contents sheet to the front of your workbook that contains links to each sheet.

This makes it very easy for the users of your file to see all the sheets in the workbook, and quickly navigate to them.  The Table of Contents also contains options that allow you to display the tab color in the list.  This makes it easy to distinguish different groups of tabs, and keeps the list organized.

You can also add this Table of Contents Gallery sheet that contains clickable image thumbnails of all the sheets in the workbook.  It’s a great way for your users to preview all sheets in the workbook, and quickly navigate to the sheet they are looking for.

the-table-of-contents-image-gallery-for-excel

A Quick Shortcut to Flip Between Two Sheets

Do you ever spend time working between two different worksheets?

Maybe you are copying and pasting data or formulas between sheets.  Maybe you are checking the results of a few formulas, and you need to jump back to the sheet that contains the source data.

Whatever it is, this process can take a lot of time if the worksheets are not located next to each other in the workbook.

Tab Hound has a button called Flip Back that will save you a ton of time when working between two sheets.

Tab Hound Flip Back Button

Simply press the Flip Back button on the ribbon to go to the last sheet you were on.  You can also use a keyboard shortcut to press this button.  So flipping between two sheets becomes lightning fast.  You can repeatedly press the Flip Back button to jump back and forth between two sheets.

Flip Back is also great if you forget what sheet you were just looking at.  I hate when this happens and now I can just press the Flip Back button to go back to the last sheet I was on.

Change How You Work With Excel

Well, what do you think?  Do you want to dramatically increase your productivity and save a ton of time with your everyday tasks?  Tab Hound will change how you work with your workbooks and help you get your work done in a fraction of the time.  You will be able to spend more time on important (and fun) work that helps you make a bigger impact.  No one is ever judged by how many sheets they could unhide in a minute… 🙂  So why waste time doing it?

The goal of Tab Hound is to help you navigate through your workbooks and get your job done faster.

commentsWhat Others are Saying…

I honestly love Tab Hound and Tab Control. I use them all the time. I shudder to think how I used to have to navigate back and forth between sheets, or how long it took to unhide multiple sheets in a large workbook.

I routinely work with very large workbooks with 90 or more worksheets in each workbook. Tab Hound and Tab Control are great! They have made navigating, organizing, and working with large workbooks much easier and incredibly faster. Anyone who has to switch back and forth between worksheets when building complex formulas will love the Flip Back feature! This is one of my favorite uses for Tab Hound. Thank you Jon for making such a useful and time saving Add-In!Peter R., Logistics Engineer

Fantastic. I like the flip back feature. I’ve got one file where I’m always going back and forth between one detail tab, this will save a ton of time. Having said that, I have a DoubleSight which is a 30” monitor along with the measly 19” secondary. The flip back is great.

Unhide multiple sheets – awesome because one by one unhiding is a pain.

Color sheet and alpha filter – very nice and useful feature. Like it.

Copy sheet to new book – another time saver, having to go through multiple clicks and to do it in couple of clicks, this is very useful.

Tab control – renaming, moving, this is great. One thing I might recommend is to add another column, an original sort column, that will allow resorting the tab list in a different manner and/or, put it back the way it was.

Other than that, and other than I hate crazy long spreadsheets, these are 2 great tools.Don H., VP Financial Planning & Analysis

Let me start by saying that this is a fantastic product and a real game changer! The flip back for me is a great feature but the Table of Contents, well that’s just taken Tab Hound to another level!

I’m sure that this will help heaps of people using Excel.”John M., Chief Inspirational Officer at MyExcelOnline.com

The software is amazing, I was able to unhide some sheets and remove the passcode. I got the data I needed, super happy.John M

Tab Hound Features Overview

Tab Hound Window Features Diagram

Here’s Exactly What You Get with Tab Hound

The Tab Hound Add-in that will help you fly through your workbooks and perform everyday tasks with ease.

  • Quickly search and jump to the worksheets in your workbooks with Search.
  • Hide and Unhide multiple sheets at the same time.
  • Copy & rename sheets with the click of a button.
  • Copy sheets to a new book in one step, instead of six.
  • Move sheets with-in the workbook.
  • Protect/Unprotect multiple sheets at the same time.
  • Add a Table of Contents to your workbook.
  • Flip back and forth between two sheets.
  • And much more!

The Tab Control Add-in

Tab Control helps you automate processes with the worksheets in your workbooks.  You can easily organize, reorder, rename, color, hide/unhide, and add sheets to your workbook.  If you spend time hiding and unhiding sheets for a periodic reporting package, then Tab Control will save you a lot of time.
Learn more about Tab Control…

FREE Bonuses

Get these free bonuses with along with Tab Hound for a limited time.
Free Bonus #1: Navigate Excel with the Keyboard eBook – Intro to Becoming a Keyboard Ninja

Do you know one of these people that seems to be able to jump around a worksheet or workbook really fast?  Getting a task done very quickly with little effort.  I call these people keyboard ninjas. In this book I show you tips and keyboard shortcuts that will start you on the path to becoming a keyboard ninja. Learning keyboard shortcuts takes practice, but it will save you a lot of time and help you get your job done faster.

Free Bonus #2: Navigate Excel with the Keyboard Video Series

This 6-part video series follows the book and will help you implement these techniques.  I explain how to use these shortcuts and give real life examples of how you can apply them in your work to get things done quickly.  It is nice to be able to see these shortcuts in action, so you can learn how to apply them in your work.

The Hero Tools Suite combines all of our add-ins into one Excel add-in with over 100 features that will save you time with your everday Excel tasks.

Click Here to Learn More about Hero Tools

See all How-To Articles

This tutorial demonstrates how to search all sheets to find a word or phrase in Excel and Google Sheets.

search all sheets 3

Search All Sheets

The search functionality in Excel searches in the current worksheet by default. However, you can also make it search all sheets in the file. Say you have the following Excel file with three sheets (January-2021, February-2021, and March-2021) and the same columns: Product Name and Price.

search all sheets sheet1

You want to search for Keyboard in the entire workbook. (It appears in cell B2 in sheet January-2021 and B7 in sheet March-2021.)

  1. First, select all sheets. Press and hold CTRL and click on sheet names (January-2021, February-2021, and March-2021.)

search all sheets 1

All sheets in the file are selected.

  1. In the Ribbon, go to Home > Find & Select > Find (or use the shortcut CTRL + F).

search all sheets 2

  1. Now, in the Find what box enter the word you want to find (“Keyboard“) and click Find All.

search all sheets 3

The bottom section of the window displays all appearances of the searched term in the workbook. As you can see, there are matches in the January-2021 (cell B2) and March-2021 (B7) sheets. If you click Find Next, you are cycled through each found cell.

See also: Using Find and Replace in Excel VBA

Search All Google Sheets

By default, Google Sheets searches all sheets for a term when you use Find and Replace.

  1. In the Menu, go to Edit > Find and replace (or use the shortcut CTRL + H).

google sheets find and replace 1

  1. In the Find box enter the word you want to find (“Keyboard“) and click Find.

google sheets find and replace 2

As a result, cell B2 in the January-2021 sheet is selected.

google sheets find and replace 3

  1. Now when you click Find again, you go to the next instance of Keyboard (B7 in March-2021, and so on) through the last appearance of the term.
    Unlike Excel, Google Sheets doesn’t offer the option to display a list of instances.

google sheets find and replace 4

Ever stuck into such an issue where you can’t see tabs in Excel or sheets not visible in Excel? Looking for some easy tricks to fix Excel tabs not showing issue?

Leave all you worry because, for easy restoration of missing worksheet tabs, this tutorial is surely going to help you a lot. Here you will get the best tricks to overcome the Excel spreadsheets disappeared issue in an easy way.

Apart from that, you will also get an easy idea of how to find hidden worksheets in Excel 2010/2013/2016/2019.

Why Did My Excel Worksheet Disappeared?

Why My Worksheets Tabs are Missing

Normally, within the Excel workbook, you will get several tabs along with the bottom of the screen. The missing Excel worksheet tab issue mainly generates when sheets may get hidden in plain sight due to some changes in the Excel setting.

In order to solve the mystery of Excel tabs not showing problems let’s first find the answer to why are tabs not showing in Excel? After then follow the workarounds to fix the Excel missing sheet tabs issue.

There are numerous things that will make your Excel sheet disappeared.

Here we have listed some most common causes of Excel sheet tabs missing. Have a Look…

  • When you inadvertently disconnect the workbook Windows from Excel. Mainly while using the trio of restore windows buttons on the title bar and moving the Windows under the status bar.
  • The screen resolution is done too high and the tab gets vanished from the bottom of the screen.
  • You may have turned off the Display options for this workbook.
  • The workbook window is sized in a way that the tabs are hidden.
  • The tabs get obscure due to the horizontal scroll bar.
  • The worksheet itself is hidden.

How To Fix Excel Tabs Not Showing Issue?

recover tabs missing in excel

Follow the given methods to troubleshoot Excel Tabs Not Showing issue:

1: Change the Zoom Settings

2: Check Show Sheet Tabs Setting Is Turned Off

3: Unhide the Worksheet

4:  Check The Show Sheet Tabs Settings Controls

5: Check Excel Windows Arrangement

6: Click the Navigation Arrow in the Excel File

Now it’s time to discuss each of these methods of fixing Excel Worksheet disappeared in detail. So, let’s get started….!

Watch out this interesting video on how to restore missing Excel worksheet tabs and cells.

Method 1: Change the Zoom Settings

Change the zoom settings to some other settings. Then change the zoom settings back to the preferred settings.

Follow these steps to do this:

  • Click the zoom out or zoom in on the status bar.

Change the Zoom Settings

  • On the View tab, click zoom in the zoom group, select the settings you want under Magnification, and then click OK.

Change the Zoom Settings 1

Hope by changing the zoom settings you are able to see the missing Excel sheet tabs but if not then follow the method 2

Method 2: Check Show Sheet Tabs Setting Is Turned Off

This might be the case that Excel sheet tabs go missing as the sheet tabs setting is turned off. To verify it, follow the steps to do so:

  • Click File > Options > Advanced, then under Display options for this workbook.
  • Assure that the Show sheet tab checkbox is selected.

show sheet tab

This process is the same for all Excel versions.

Method 3: Unhide the Worksheet

In many cases, the Excel sheet disappeared by itself. So to get the missing sheet tab back you must use the unhide worksheet of Excel.

Follow the steps to do so:

  • Right-click on any visible tab on the worksheet > click Unhide
  • Then in the Unhide dialog box > click sheet you desire to unhide
  • Click Ok.

unhide a sheet

Method 4:  Check The Show Sheet Tabs Settings Controls

In Excel 2010 and former, it is comparatively easy to unintentionally organize a spreadsheet Window. Subsequently, the worksheet tabs aren’t present on the screen, even if the Show Sheet Tabs option is enabled. While this happens, double click on the workbook’s name to maximize the Window and recover workbooks.

In Excel 2013 if you are not able to see the worksheet tabs, simply double-click on the words “Microsoft Excel” at the top of the Windows for maximizing Excel’s application window.

Method 5: Check Excel Windows Arrangement

In some cases, it is found that Excel Windows get arranged in such a way so that the tabs are not visible.  So check for them. Make use of the keyboard shortcut to navigate between worksheets within the workbook. And to do this, press Ctrl – Page Up for activating the adjacent worksheets to the left and or else press Ctrl- Page Down for activating the next worksheet to the right.

figure-3

In this activate menu Excel 2013 provides helpful improvements since the entire worksheets are displayed in a single dialog box and after that, you can select a worksheet by entering the first letter of the sheet name.

In Excel 2010 or the earlier version, the Activate menu very first displays up to 16 worksheets and requires selecting more sheets for displaying more lists.

Additionally, in Excel 2010 or the earlier version, you should select the desired sheet name by making use of your mouse. Because the menu cannot be accessed by way of keystrokes as it is possible in Excel 2013.

You can also read: 7 Tricks To Fix Missing Gridlines In Excel Issue

Method 6: Click the Navigation Arrow in the Excel File

missing-worksheet-tabs-figure-4-copy

In many other cases, it happens that the worksheet tabs are available, but a worksheet still appears missing. In Excel 2007 and later versions, right-click on any worksheet tab and select unhide.

Well, if the command is disabled there is most likely no hidden worksheet is present in the workbook. However, there is still a way you can find out this possibility.

Follow the steps to access the unhide sheet command from Excel’s main menu:

  • Excel 2007 and later: Go to the home tab > select format > click hide and unhide sheet.

hide-unhide-figure-1-copy

  • Excel 2003 and earlier: Select Format > Sheet > and Unhide.
  • And Excel 2011 for Mac: From the main menu > select format option > sheet > unhide. The format command on the home tab of the ribbon doesn’t let you unhide the worksheet.

If the unhide sheet is disabled, you can’t necessarily assume that there are no hidden worksheets within a workbook.

Automatic Solution To Recover Missing/Disappeared Tabs In Excel

Well, if none of the above-mentioned methods help you to recover missing sheets in Excel. Then the chances are high that your Excel sheet has caught into some corruption issue. Due to the corruption of the Excel sheet, you may also find that your Excel sheet content disappeared.

In this case, you can make use of the professional recommended MS Excel Repair Tool.  This is the best tool to repair any sort of issues, corruption as well as errors in Excel files. It also restores the entire data in the preferred location. It is too easy to use.

* Free version of the product only previews recoverable data.

Steps to Utilize MS Excel Repair Tool:

Conclusion:

Hope after reading the article you are able to recover your missing sheet tabs in Excel. I tried my best to provide complete information about how to recover the missing or hidden sheet tabs in Microsoft Excel.

So, now it’s your turn to make use of the given methods to fix Excel tabs not showing the issue. Just go for it.

Good Luck!!!  

Priyanka is an entrepreneur & content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.

If you have an Excel workbook that has hundreds of worksheets, and now you want to get a list of all the worksheet names, you can refer to this article. Here we will share 3 simple methods with you.

Sometimes, you may be required to generate a list of all worksheet names in an Excel workbook. If there are only few sheets, you can just use the Method 1 to list the sheet names manually. However, in the case that the Excel workbook contains a great number of worksheets, you had better use the latter 2 methods, which are much more efficient.

Method 1: Get List Manually

  1. First off, open the specific Excel workbook.
  2. Then, double click on a sheet’s name in sheet list at the bottom.
  3. Next, press “Ctrl + C” to copy the name.Copy Sheet Name
  4. Later, create a text file.
  5. Then, press “Ctrl + V” to paste the sheet name.Paste Sheet Name
  6. Now, in this way, you can copy each sheet’s name to the text file one by one.

Method 2: List with Formula

  1. At the outset, turn to “Formulas” tab and click the “Name Manager” button.
  2. Next, in popup window, click “New”.Name Manager
  3. In the subsequent dialog box, enter “ListSheets” in the “Name” field.
  4. Later, in the “Refers to” field, input the following formula:
=REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")

Customize New Name

  1. After that, click “OK” and “Close” to save this formula.
  2. Next, create a new worksheet in the current workbook.
  3. Then, enter “1” in Cell A1 and “2” in Cell A2.
  4. Afterwards, select the two cells and drag them down to input 2,3,4,5, etc. in Column A.Enter Sequential Numbers
  5. Later, put the following formula in Cell B1.
=INDEX(ListSheets,A1)

Enter Formula in Cell B1

  1. At once, the first sheet name will be input in Cell B1.
  2. Finally, just copy the formula down until you see the “#REF!” error.Copy Formula Down to List Sheet Names

Method 3: List via Excel VBA

  1. For a start, trigger Excel VBA editor according to “How to Run VBA Code in Your Excel“.
  2. Then, put the following code into a module or project.
Sub ListSheetNamesInNewWorkbook()
    Dim objNewWorkbook As Workbook
    Dim objNewWorksheet As Worksheet

    Set objNewWorkbook = Excel.Application.Workbooks.Add
    Set objNewWorksheet = objNewWorkbook.Sheets(1)

    For i = 1 To ThisWorkbook.Sheets.Count
        objNewWorksheet.Cells(i, 1) = i
        objNewWorksheet.Cells(i, 2) = ThisWorkbook.Sheets(i).Name
    Next i

    With objNewWorksheet
         .Rows(1).Insert
         .Cells(1, 1) = "INDEX"
         .Cells(1, 1).Font.Bold = True
         .Cells(1, 2) = "NAME"
         .Cells(1, 2).Font.Bold = True
         .Columns("A:B").AutoFit
    End With
End Sub

VBA Code - List Sheet Names

  1. Later, press “F5” to run this macro right now.
  2. At once, a new Excel workbook will show up, in which you can see the list of worksheet names of the source Excel workbook.Listed Sheet Names in New Excel Workbook

Comparison

Advantages Disadvantages
Method 1 Easy to operate Too troublesome if there are a lot of worksheets
Method 2 Easy to operate Demands you to type the index first
Method 3 Quick and convenient Users should beware of the external malicious macros
Easy even for VBA newbies

Excel Gets Corrupted

MS Excel is known to crash from time to time, thereby damaging the current files on saving. Therefore, it’s highly recommended to get hold of an external powerful Excel repair tool, such as DataNumen Outlook Repair. It’s because that self-recovery feature in Excel is proven to fail frequently.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql fix and outlook repair software products. For more information visit www.datanumen.com

Is there a way to find the names of all the sheets as a list?

I can find the sheet name of the sheet where the formula is placed in via the following formula:

=RIGHT(CELL("filename";A1);LEN(CELL("filename";A1))-SEARCH("]";CELL("filename";A1);1))

This works for the sheet the formula is placed in. How can I get a list of all the sheets that are in a file on one sheet (let’s say in cell A1:A5 if I have 5 sheets)?

I would like to make it so when someone changes a sheet name the macro keeps working.

Community's user avatar

asked Dec 10, 2018 at 9:18

Mischa Urlings's user avatar

btw, in vba you can refer to worksheets by name or by object. See below, if you use the first method of referencing your worksheets it will always work with any name.
enter image description here

answered Dec 10, 2018 at 9:51

SNicolaou's user avatar

SNicolaouSNicolaou

5501 gold badge3 silver badges15 bronze badges

2

I would keep a very hidden sheet with the formula you used referencing each sheet.

When the Workbook_NewSheet event fires a formula pointing to the new sheet is created:

  • Create a sheet and give it the Code Name of shtNames.
    • Give the sheet a tab name of SheetNames.
    • In cell A1 of shtNames add a heading (I just used «Sheet List»).
    • In Properties for the sheet change Visible to 2 — xlSheetVeryHidden.
      You can only do this if there at least one visible sheet left.
  • Add this code to the ThisWorkbook module:

Private Sub Workbook_NewSheet(ByVal Sh As Object)

    With shtNames
        .Cells(.Rows.Count, 1).End(xlUp).Offset(1).Formula = _
            "=RIGHT(CELL(""filename"",'" & Sh.Name & "'!$A$1), " & _
            "LEN(CELL(""filename"",'" & Sh.Name & "'!$A$1))-" & _
            "FIND(""]"",CELL(""filename"",'" & Sh.Name & "'!$A$1),1))"
    End With

End Sub  

Create a named range in the Name Manager:

  • I called it SheetList.
  • Use this formula:
    =SheetNames!$A$2:INDEX(SheetNames!$A:$A,COUNTA(SheetNames!$A:$A))

You can then use SheetList as the source for Data Validation lists and list controls.

Two potential problems I haven’t looked at yet are rearranging the sheets and deleting the sheets.

so when someone changes a sheetname the macro keeps working

As @SNicolaou said though — use the sheet code name which the user can’t change and your code will carry on working no matter the sheet tab name.

answered Dec 10, 2018 at 10:43

Darren Bartrup-Cook's user avatar

@Mischa Urlings with the below code you get as a message in message box the following:

  1. Sheet Name
  2. Sheet Position

    Option Explicit
    
    Sub test()
    
    Dim ws As Worksheet
    Dim str As String
    
    For Each ws In ThisWorkbook.Worksheets
        str = str & vbNewLine & "Sheet named " & ws.Name & " located in position " & ws.Index & "."
    Next
    
    'Get the names in a list in message box
    MsgBox str
    
    End Sub
    

answered Dec 10, 2018 at 10:19

Error 1004's user avatar

Error 1004Error 1004

7,8253 gold badges21 silver badges46 bronze badges

a VBA function like:

Function SheetName(ByVal Index As Long, Optional ByVal Book as Range) as String
    Application.Volatile
    If Book Is Nothing Then Set Book = Application.Caller
    SheetName=Book.Worksheet.Parent.Sheets(Index).Name
End Function

would return sheet names by index, like an Excel formula. Example:

=SheetName(1) 'returns "Sheet1"
=SheetName(3) 'returns "Sheet3"

Using optional range in another book, you can get other book sheet names:

=SheetName(1, [Some other book.xls]Sheet1!A1) 'returns "Sheet1"
=SheetName(2, [Some other book.xls]Sheet1!A1) 'returns "Sheet2"

answered Dec 10, 2018 at 9:32

LS_ᴅᴇᴠ's user avatar

LS_ᴅᴇᴠLS_ᴅᴇᴠ

10.8k1 gold badge22 silver badges46 bronze badges

3

Make a defined name(formulas, name manager) : named: YourSheetNames
in the field refersto you place:

=IF(NOW()>0,REPLACE(GET.WORKBOOK(1),1;FIND("]",GET.WORKBOOK(1)),""))

In your sheet you place in A1:A5:

=INDEX(YourSheetNames,ROW())

this wil give you (as long as calculation is set to xlautomatic) an actual list

answered Dec 10, 2018 at 9:28

EvR's user avatar

EvREvR

3,3882 gold badges12 silver badges23 bronze badges

2

The following VBA macro function returns all worksheets names as an array:

Function GetWorksheets() As Variant
    
    Dim ws As Worksheet
    Dim x As Integer
    Dim WSArray As Variant
    ReDim WSArray(1 To Worksheets.Count)

    x = 1
    For Each ws In Worksheets
        'Sheets("Sheet1").Cells(x, 1) = ws.Name
        WSArray(x) = ws.Name
        x = x + 1
    Next ws
    
    'Output Array
    GetWorksheets = WSArray
End Function

After added to VBA Module, you can call it anywhere in a Workbook the same way you call a regular Excel Formula.

enter image description here
enter image description here

This VBA Function can be used as a more secure alternative to the following Excel 4.0 (XLM) macro:

=REPLACE(GET.WORKBOOK(1);1;FIND("]";GET.WORKBOOK(1));"")

answered Dec 8, 2022 at 6:03

Néstor Waldyd's user avatar

Like this post? Please share to your friends:
  • Can find project or library excel error
  • Can find one more word to say
  • Can exercises for kids word
  • Can execute code in break mode in excel
  • Can excel run javascript