#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default worksheet tab

You'd have to use a macro (or do it manually).

This kind of macro would go in the ThisWorkbook module:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim myHeader As String
With Me.Worksheets("Annex I - Buildings")
myHeader = Mid(.Name, 1, Len(.Name) - Len("- buildings") - 1)
.PageSetup.CenterHeader = myHeader
End With
End Sub



AsquareDC wrote:

thanks for your response.

I wanted the name of my worksheet to be displayed in the header by using
"&[Tab]". However I do not want all the name to be displayed and I was
thinking that there is a syntax that could be used in the header section that
allows for some of it to be truncated.

That is what I am looking for.

"Mike H" wrote:

Hi,

I'm not sure what you mean by 'in a header' but to display the 7 leftmost
characters of your worksheet name try this

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,7)

Adjust the last number 7 to display more or less characters

Mike

"AsquareDC" wrote:

i want to only show a part of the worksheet tab name in header. for e.g, I
have my worksheet named Annex I - Buildings but I want only Annex I to be
displayed.

How do I do that?



--

Dave Peterson
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
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Excel Worksheet Functions 2 September 7th 06 05:05 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Charts and Charting in Excel 3 August 24th 06 07:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Discussion (Misc queries) 2 August 24th 06 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Worksheet Functions 2 August 24th 06 05:26 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM


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