#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default count tabs

Is there a way to count the number of tabs in a worksheet?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default count tabs

In code???

msgbox Activeworkbook.sheets.count



alm09 wrote:

Is there a way to count the number of tabs in a worksheet?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default count tabs

You could use this function. Al + F11 to open VB editor, right click this
workbook and insert module and paste this in.

Function sheetsinbook()
sheetsinbook = Worksheets.Count
End Function

this formula in a cell will return the number of worksheets.
=sheetsinbook()

Mike



"alm09" wrote:

Is there a way to count the number of tabs in a worksheet?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default count tabs

I would rather use the formula but it is not working. I get a #NAME? error.
Is there an input (i.e. file name) in the parentheses or is to remain null?


"Mike H" wrote:

You could use this function. Al + F11 to open VB editor, right click this
workbook and insert module and paste this in.

Function sheetsinbook()
sheetsinbook = Worksheets.Count
End Function

this formula in a cell will return the number of worksheets.
=sheetsinbook()

Mike



"alm09" wrote:

Is there a way to count the number of tabs in a worksheet?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default count tabs

if its giving a name error then you haven't put the function it calls in the
correct place. Put the function in a module in your workbook.

You could use this function. Alt + F11 to open VB editor, right click this
workbook and insert module and paste this in.


Mike


"alm09" wrote:

I would rather use the formula but it is not working. I get a #NAME? error.
Is there an input (i.e. file name) in the parentheses or is to remain null?


"Mike H" wrote:

You could use this function. Al + F11 to open VB editor, right click this
workbook and insert module and paste this in.

Function sheetsinbook()
sheetsinbook = Worksheets.Count
End Function

this formula in a cell will return the number of worksheets.
=sheetsinbook()

Mike



"alm09" wrote:

Is there a way to count the number of tabs in a worksheet?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide tabs from view then lock tabs? slowboat Excel Discussion (Misc queries) 1 December 19th 07 07:06 AM
Count through tabs Pietro Excel Discussion (Misc queries) 2 March 3rd 07 04:44 AM
Can i set up tabs within tabs on Excel? Gizelle Excel Worksheet Functions 5 October 30th 06 12:52 PM
Page Count with Tabs tom Excel Discussion (Misc queries) 3 October 27th 06 04:09 AM
Is there a way to count all the worksheet tabs in an Excel speadsh PCGArts Excel Discussion (Misc queries) 2 April 14th 06 05:48 PM


All times are GMT +1. The time now is 03:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"