Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sheets count

how do I return a value for the sheets number position? I can return the name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How do
I find this?

Please advise.
Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default sheets count

Hi,

The sheets index property returns its position in the sheets collection.


---
Regards,
Norman



"Sheets number position" <Sheets number
wrote in message ...
how do I return a value for the sheets number position? I can return the
name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How
do
I find this?

Please advise.
Thank you



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default sheets count

Sheets(sheet_name).Index

--
HTH

Bob Phillips

"Sheets number position" <Sheets number
wrote in message ...
how do I return a value for the sheets number position? I can return the

name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How

do
I find this?

Please advise.
Thank you



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default sheets count

If you want to return the postion of the sheet then:
activesheet.index
or
sheets("MySheet").index

If you want to refer to a sheet by its postion then
sheets(34).select 'etc

hope this helps
Rowan

Sheets number position wrote:
how do I return a value for the sheets number position? I can return the name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How do
I find this?

Please advise.
Thank you

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 number of sheets booshi Excel Worksheet Functions 3 April 25th 23 11:45 AM
Count sheets Dale[_5_] Excel Discussion (Misc queries) 2 April 10th 09 11:29 AM
Count the number of sheets. Olle Svensson Excel Discussion (Misc queries) 3 March 13th 06 02:30 PM
COUNT over several sheets Fybo Excel Discussion (Misc queries) 6 March 8th 05 04:40 PM
sheets(count) code Young-Hwan Choi Excel Programming 4 November 20th 03 04:10 PM


All times are GMT +1. The time now is 10:16 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"