Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Shorting a long title to a worksheet tab

IS there an easy way to shorten a project name like "Advanced Network
Application Production" to something that will easily fit on a tab. Right
now I am just taking the first 31 characters, but some projects have the same
first 31 characters. I Found away around that, but it is not very
descriptive. I was thinking something like searching for the spaces between
words and then taking the first 3 or 4 letters of each word. Is that
possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Shorting a long title to a worksheet tab

You could give them numbers.


"Brian S" wrote in message
...
IS there an easy way to shorten a project name like "Advanced Network
Application Production" to something that will easily fit on a tab. Right
now I am just taking the first 31 characters, but some projects have the
same
first 31 characters. I Found away around that, but it is not very
descriptive. I was thinking something like searching for the spaces
between
words and then taking the first 3 or 4 letters of each word. Is that
possible?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default Shorting a long title to a worksheet tab

Try using an acronym like "ANAP" or you could do what you wanted to do "Adv
Net App Pro". The code below will take the first 3 letters of each word and
rename the worksheet. It will scan each sheet in the workbook. Hope this
helps! If so, let me know, click "YES" below.

Sub RenameSheets()

Dim Letters As Long
Dim wks As Worksheet
Dim aryName As Variant
Dim i As Long
Dim strNewName As String

' the amount of letters to get from sheet name
Letters = 3

' scan each worksheet in workbook
For Each wks In Worksheets

' form array of words in wks name
aryName = Split(wks.Name)

' get first 3 letters of
For i = LBound(aryName) To UBound(aryName)
strNewName = strNewName & Left(aryName(i), Letters) & " "
Next i

' change wks name to new name
wks.Name = Trim(strNewName)

' reset new name string
strNewName = ""
Next wks

End Sub

--
Cheers,
Ryan


"Brian S" wrote:

IS there an easy way to shorten a project name like "Advanced Network
Application Production" to something that will easily fit on a tab. Right
now I am just taking the first 31 characters, but some projects have the same
first 31 characters. I Found away around that, but it is not very
descriptive. I was thinking something like searching for the spaces between
words and then taking the first 3 or 4 letters of each word. Is that
possible?

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
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo Max Loger Excel Discussion (Misc queries) 0 June 14th 11 04:30 PM
Shorting code Brad Excel Programming 4 June 3rd 08 07:18 PM
Shorting the Code Keith[_19_] Excel Programming 3 February 5th 08 08:22 PM
Link title of worksheet to whatever the worksheet tab is named Par3 Excel Discussion (Misc queries) 1 March 13th 06 08:09 PM
... I would like the Worksheet Tab Title to be in Cell A1 too... Dr. Darrell Excel Discussion (Misc queries) 11 October 28th 05 02:47 PM


All times are GMT +1. The time now is 09:29 AM.

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"