With Excel 2013, Microsoft has introduced a new function viz. SHEETS
This function returns the total number of sheets in reference. For example if a workbook has 5 sheets and if you write this function as shown below, you will get 5 as output:-
=SHEETS ( reference )
where, Reference is optional but can be a reference to a worksheet or a defined name. Basically it is a reference for which you want to know the number of sheet it contains.
Note:- As mentioned in above example if reference is omitted, function will return the number of worksheets present in current workbook.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.