Excel Automation – Creating an Index sheet in a Workbook
You may have worked on an Excel workbook with just 3 or 4 worksheets in them.
In those workbooks, navigating between worksheets is relatively easy.
Right?
But what if you are working with a humongous dataset with 20 or 40 may be 100 worksheets in the Excel workbook?
What do you do then?
Navigating to the middle sheets or sheets at the end can be a very tedious and time-consuming process.
Isn’t it?
Yes.
Well, in those cases, it is best to create an Index Sheet upfront with a list of all the sheets in the workbook.
Any user can go to any of the sheet in the workbook by clicking on the corresponding index link of that particular worksheet.
But creating this index sheet manually is also an uphill task.
Yeah it is!
Well, you are in luck.
You don’t need to manually create a link to each of the sheet in the workbook.
Instead you can just create it automatically using a macro.
But you don’t know about programming also.
How do you write a macro code for this automation?
Don’t worry don’t worry!
We are still here.
Let us show you how you can create this automated index sheet through an easily available macro code.
Just follow these simple steps below:
Step 1:
Open an Excel workbook that has multiple sheets. Create a new sheet at the front of the workbook and name it “Index Sheet” or anything else you may want. Also, you can format this sheet to put serial numbers if you know the exact number of sheets in the workbook.
Step 2:
Go to the Views tab. Click on the Macros drop down and select View Macros. A macro dialog box opens up.
Step 3:
Let us name the macro in the Macro name option in the macro dialog box. For example, we name the macro name is “CreateIndex”. Once done, Click on Create button.
Step 4:
The macro editor box opens up. There are 2 lines of code already which indicate the macro name is “CreateIndex”. Any code that we write within these 2 lines will become part of the “CreateIndex” macro.
Step 5:
Simply Copy and Paste the below code within the 2 lines of code in the Macro Editor.
Dim sh As Worksheet
Dim cell As Range
For Each sh In ActiveWorkbook.Worksheets
If ActiveSheet.Name <> sh.Name Then
ActiveCell.Hyperlinks.Add Anchor:=Selection, Address:=””, SubAddress:= _
“‘” & sh.Name & “‘” & “!A1”, TextToDisplay:=sh.Name
ActiveCell.Offset(1, 0).Select
End If
Next sh
Step 6:
Close the macro editor and come to the Index Sheet in the Excel workbook. Place the cursor where you would like the Sheet names to start appearing from.
Step 7:
Go to the View tab and click on Macros dropdown. Select View Macros again. The Macro dialog box opens up with “CreateIndex” Macro selected. Click on Run.
Step 8:
Voila. The individual sheet names appear one below the other on the Index Sheet. Notice there is a hyperlink to each sheet names. So you can simply click on any of the sheet names to go to the respective sheet.
Step 9 :
Create a hyperlink on each of the individual sheets from 2009 to 2018 to come back to the Index sheet. This way you can create a back and forth navigation from the index sheets to the individual sheets and back again.
This was neat! Simple yet powerful.
What do you think?
28 thoughts on “Excel Automation: How to Create an Index Sheet in a Workbook”
[…] hope that you have enjoyed our tips and tricks for finding articles on Google and adding data analysis in Excel. If you have any additional tips, […]
… [Trackback]
[…] Find More to that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] Information on that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] Find More Information here on that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] Find More here on that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] Read More Info here to that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] There you will find 75927 additional Info to that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] Find More Information here on that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] Read More on that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
… [Trackback]
[…] Here you can find 83816 additional Info to that Topic: skillfine.com/excel-automation-creating-index-sheet-in-workbook/ […]
I keep getting senex errors on this – help
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Xess Global is a growing digital marketing agency, creatively and technically expertise to translate your brand into its’ best digital character.
Our marketing, designing, and development strategy creates unique, engaging websites, graphics, brands, and other
digital solutions that deliver you a return on creativity.
Hi my friend! I wish to say that this post is amazing,
great written and include approximately all significant
infos. I’d like to peer more posts like this .
What’s up, I would like to subscribe for this webpage to obtain most recent updates, thus where can i do it
please assist.
Avant d’amuser vos enfants, c’est à vous de cacher les bonbons dans
les pièces de la maison que vous avez choisies.
Highly descriptive post, I enjoyed that a lot.
Will there be a part 2?
Hey There. I discovered your weblog the use of msn. This is a very well written article.
I’ll make sure to bookmark it and return to read extra of your useful info.
Thanks for the post. I’ll certainly return.
Hello, everything is going sound here and
ofcourse every one is sharing data, that’s
truly excellent, keep up writing.
Howdy! This post could not be written any
better! Going through this article reminds me of my previous roommate!
He always kept preaching about this. I most certainly will send
this information to him. Pretty sure he’s going to have a great read.
I appreciate you for sharing!
I’m not sure where you’re getting your info, but good topic.
I needs to spend some time learning more or understanding more.
Thanks for excellent info I was looking for this information for
my mission.
Thank you for every other informative blog. The place else could I am getting that type of information written in such a perfect method?
I have a undertaking that I am simply now operating on, and
I’ve been on the look out for such info.
I have beewn explooring for a little forr any high-quality
articles or bllog postts on this kind oof area .
Explorinbg in Yahooo I eventuallly stumbled upon this site.
Readibg this informatio So i’m hhappy to covey thbat I have aan incredibly excellent uncanny feeling I came upon just what I needed.
I suhh a llot unquestionaly will make ssure tto ddo nott oveerlook this site and provides
it a lok regularly.
Spot on with thiks write-up, I honestly feel this sitfe needs much more attention. I’ll
probably bbe returnming tto read trough more, thanks ffor the information!
Hello Dear, are you truly visiting this web site on a regular basis, if so after that you will
absolutely get nice experience.
However, before diving into a vast library of crypto games, it is critical
to examine other important elements.
Great work! This is the kind of info that should be shared across the net.
Disgrace on the seek engines for not positioning this
publish upper! Come on over and visit my site . Thanks =)
My brother recommended I might like this blog.
He was entirely right. This post actually made my day.
You cann’t imagine just how much time I had spent for this info!
Thanks!