Microsoft Office Tutorials and References
In Depth Information
Syntax
Figure 12.14.
Figure 12.14. Using
Using SHEET
SHEET and
and SHEETS
lets you figure out the position of the
current worksheet.
SHEETS lets you figure out the position of the
current worksheet.
In cell B3, =SHEETS() tells you that there are currently five sheets in
the workbook. This formula seems far more useful than the syntax in cell
B4, which indicates how many worksheets are included in a 3-D reference.
=SHEETS(Jan:Mar!A1) returns 3 to indicate that the reference contains three
worksheets.
In cell B5, a formula of =SHEET() or =SHEET(A1) indicates that this work-
sheet is the fourth worksheet in the workbook. Certainly in this case, you
would want to use =SHEET(). However, the figure shows the other syntax in
case you would want to get the sheet number of another worksheet, such as
=SHEET(Feb!A1).
You might wonder how this information could be useful. Who cares that this
is worksheet 4 of 5? Well, if you set up the worksheets and can assume that
the structure of the worksheets will remain constant, you can ascertain in-
formation based on the position. For example, in cell B6, the sheet number is
used in conjunction with EOMONTH and DATE functions to get the ending date
for the current worksheet.
Search JabSto ::




Custom Search