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

hi,

lets say i have a number of sheets, with names like acct1, acct2, acct3,
acct4 and so forth. how can i determine the largest of the name? like from
the above, acct4 is the largest.

thanks in advance,
geebee


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default highest sheet name

highnum = 0
For Each sht In ThisWorkbook.Sheets
If Left(sht.Name, 4) = "acct" Then
newhighnum = Val(Mid(sht.Name, 5))
If newhighnum highnum Then
highnum = newhighnum
End If
End If
Next sht

"geebee" wrote:

hi,

lets say i have a number of sheets, with names like acct1, acct2, acct3,
acct4 and so forth. how can i determine the largest of the name? like from
the above, acct4 is the largest.

thanks in advance,
geebee


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
Next highest Value Thanks Excel Worksheet Functions 1 January 20th 09 09:39 PM
Highest, Second Highest , Third Highest and so on gkb Excel Discussion (Misc queries) 3 December 7th 06 12:14 PM
Display the Highest, Second Highest, Third Highest and so on... gkb Excel Discussion (Misc queries) 7 December 1st 06 10:45 PM
2 rows, highest No in row 1, then highest number in row 2 relating to that column, possible duplicates John Excel Worksheet Functions 3 August 11th 06 04:34 AM
Formatting the 5 highest values in a range, and copying them to another sheet [email protected] Excel Programming 0 April 7th 06 01:29 PM


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