Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Olle Svensson
 
Posts: n/a
Default Count the number of sheets.

Hi.

I want to do the simplest thing possible; count the number of sheets in a
workbook and show the result in a cell.

See, basically, I want every new copied sheet to have a reference in a cell
like this:
=(numberofsheets)-1

I know about the footer and header but I have sheets that are for summary
and index reasons which would throw off the count of the sheets I intend to
copy.

Not sure if this makes any sense, I pretty much just want to count the
number of sheets with a formula.

Thank you,
Olle Svensson
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Count the number of sheets.

In vba you can get the count with

ACtiveworkbook.Sheets.Count

So I think you would need to incorporate that in a UDF.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Olle Svensson" wrote in message
...
Hi.

I want to do the simplest thing possible; count the number of sheets in a
workbook and show the result in a cell.

See, basically, I want every new copied sheet to have a reference in a

cell
like this:
=(numberofsheets)-1

I know about the footer and header but I have sheets that are for summary
and index reasons which would throw off the count of the sheets I intend

to
copy.

Not sure if this makes any sense, I pretty much just want to count the
number of sheets with a formula.

Thank you,
Olle Svensson



  #3   Report Post  
Posted to microsoft.public.excel.misc
Olle Svensson
 
Posts: n/a
Default Count the number of sheets.

Thank you, but I'm afraid that does not really help me. See I'm only using it
for a little thing that could be done manually without effort so creating
macros and UDF's seems rather overkill.

Is it not a rather big mistake that MS did not bother to put in a simple
function for this?

"Bob Phillips" wrote:

In vba you can get the count with

ACtiveworkbook.Sheets.Count

So I think you would need to incorporate that in a UDF.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Olle Svensson" wrote in message
...
Hi.

I want to do the simplest thing possible; count the number of sheets in a
workbook and show the result in a cell.

See, basically, I want every new copied sheet to have a reference in a

cell
like this:
=(numberofsheets)-1

I know about the footer and header but I have sheets that are for summary
and index reasons which would throw off the count of the sheets I intend

to
copy.

Not sure if this makes any sense, I pretty much just want to count the
number of sheets with a formula.

Thank you,
Olle Svensson




  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Count the number of sheets.

Not really, the demand for it is very low.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Olle Svensson" wrote in message
...
Thank you, but I'm afraid that does not really help me. See I'm only using

it
for a little thing that could be done manually without effort so creating
macros and UDF's seems rather overkill.

Is it not a rather big mistake that MS did not bother to put in a simple
function for this?

"Bob Phillips" wrote:

In vba you can get the count with

ACtiveworkbook.Sheets.Count

So I think you would need to incorporate that in a UDF.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Olle Svensson" wrote in

message
...
Hi.

I want to do the simplest thing possible; count the number of sheets

in a
workbook and show the result in a cell.

See, basically, I want every new copied sheet to have a reference in a

cell
like this:
=(numberofsheets)-1

I know about the footer and header but I have sheets that are for

summary
and index reasons which would throw off the count of the sheets I

intend
to
copy.

Not sure if this makes any sense, I pretty much just want to count the
number of sheets with a formula.

Thank you,
Olle Svensson






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
How to count the number of times something occurs within a certain month Joyce Excel Worksheet Functions 2 October 18th 05 08:38 PM
count the number of times the same number shown Noemi Excel Discussion (Misc queries) 1 September 22nd 05 04:00 AM
Count number of cells that contain a certain letter - Case Sensitive elite Excel Discussion (Misc queries) 4 September 20th 05 01:41 PM
Count the number of Cells in one ROW with conditions Amanda Excel Worksheet Functions 2 September 9th 05 04:03 PM
Count number to reach a cumulative value Bruce Excel Worksheet Functions 5 January 25th 05 05:14 PM


All times are GMT +1. The time now is 02:19 PM.

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

About Us

"It's about Microsoft Excel"