Computers » Excel
ID #1135
Is there a simple, quick way to count how many worksheets are within a workbook?
It's not really that simple or quick...
Open Excel and create a new workbook. Open the VB Editor using <Alt> F11. Double-
click on ThisWorkbook to bring up a code window on the right. Paste in the
following lines:
Option Explicit Sub CountSheets() Dim iSheetCount As Integer iSheetCount = ActiveWorkbook.Worksheets.Count MsgBox iSheetCount End Sub
Switch back to Excel and run the subroutine by using <Alt> F8 to bring up the
macro list and double-clicking on CountSheets. A dialog box will display the
number of worksheets.
(see Excel Tutorials)
Tags: excel
Related entries:
- I would like to add parentheses ( ) around certain text within cells. How can I do this?
- I have a very very large spreadsheet which has a column formatted as follows: B 101.1.1. I need to delete the B and leave the numeric. How can I do this without deleting the B row by row?
- What date is 90 days from August 10, 2007?
- What is the best way to store a list of golf league members by name and addresses?
- When I type in text in an Excel worksheet it tries to help by filling in the rest of the cell if the characters are similar to an existing cell. This is not helping me enter data at all. How can I turn this feature off?
Last update: 2008-04-01 21:06
Author: Ask MIStupid
Revision: 1.22
You can comment on this entry
|