Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how do you print colored headers with Excel 2003

I am making a spread sheet and want to print my header and footer in red. i
have used the help option, but couldn't find any thing I could use there. I
am using the 2003 version of Microsoft Excel.
  #2   Report Post  
Posted to microsoft.public.excel.misc
dlw dlw is offline
external usenet poster
 
Posts: 510
Default how do you print colored headers with Excel 2003

I have an older version, you have to do a custom header/footer and the font
option (an A) is there.

"mgrenier" wrote:

I am making a spread sheet and want to print my header and footer in red. i
have used the help option, but couldn't find any thing I could use there. I
am using the 2003 version of Microsoft Excel.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default how do you print colored headers with Excel 2003

Excel cannot do this. Your options would be as follows:
1) Create a graphic which is a red box the size you need to fit across the
page, then insert that graphic in the header and/or footer.
2) Use your first couple of rows as your "header", apply background color,
and instruct it to repeat printing those rows on all pages...however, there's
no good way to add a footer this roundabout way.

You could use a macro to accomplish the second option, but it will change
your data by manually inserting footers every so many rows.

Sub FakeHeaderFooter()
Dim LHeader As String
Dim CHeader As String
Dim LFooter As String
Dim CFooter As String
Dim CBottom As Integer
Dim CRow As Integer
Dim PageSize As Integer

LHeader = "Top Left"
CHeader = "Top Center"
LFooter = "Bottom Left"
CFooter = "Bottom Center"
PageSize = 46

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.PrintArea = ""
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(1)
.RightMargin = Application.InchesToPoints(1)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.Orientation = xlPortrait
End With

CBottom = Range("A16000").End(xlUp).Row

CRow = 1
Do Until CRow CBottom
If CRow Mod PageSize = 1 Then
Rows(CRow).Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
CBottom = CBottom + 2

Cells(CRow, 1).Value = LHeader
Cells(CRow, 4).Value = CHeader
Range(Cells(CRow, 1), _
Cells(CRow, 8)).Interior.ColorIndex = 34
Range(Cells(CRow + 1, 1), _
Cells(CRow + 1, 8)).Interior.ColorIndex = xlNone
CRow = CRow + 2
ElseIf CRow Mod PageSize = PageSize - 1 Then
Rows(CRow).Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
CBottom = CBottom + 2

Cells(CRow + 1, 1).Value = LFooter
Cells(CRow + 1, 4).Value = CFooter
Range(Cells(CRow + 1, 1), _
Cells(CRow + 1, 8)).Interior.ColorIndex = 34
CRow = CRow + 2
Else
CRow = CRow + 1
End If
Loop

LastPageNumber = PageNumber + 1
LastRow = LastPageNumber * PageSize
If CBottom < LastRow Then
Range(Cells(LastRow, 1), _
Cells(LastRow, 8)).Interior.ColorIndex = 34
Cells(LastRow, 1).Value = LFooter
Cells(LastRow, 4).Value = CFooter
End If

CBottom = Range("A16000").End(xlUp).Row

CRow = 2
Do Until CRow CBottom
If CRow Mod PageSize = 1 Then
Cells(CRow, 1).PageBreak = xlManual
End If
CRow = CRow + 1
Loop
End Sub

To change the number of lines per page, just change the value assigned to
the PageSize variable. You can also change what appears in the "header" and
"footer" area by changing what is assigned to the LHeader, CHeader, LFooter,
and CFooter variables.


--
Please remember to indicate when the post is answered so others can benefit
from it later.


"mgrenier" wrote:

I am making a spread sheet and want to print my header and footer in red. i
have used the help option, but couldn't find any thing I could use there. I
am using the 2003 version of Microsoft Excel.

  #4   Report Post  
Posted to microsoft.public.excel.misc
dlw dlw is offline
external usenet poster
 
Posts: 510
Default how do you print colored headers with Excel 2003

Yes, you are correct, the font formatting I was referring to does not have
color option.

"KC Rippstein" wrote:

Excel cannot do this. Your options would be as follows:
1) Create a graphic which is a red box the size you need to fit across the
page, then insert that graphic in the header and/or footer.
2) Use your first couple of rows as your "header", apply background color,
and instruct it to repeat printing those rows on all pages...however, there's
no good way to add a footer this roundabout way.

You could use a macro to accomplish the second option, but it will change
your data by manually inserting footers every so many rows.

Sub FakeHeaderFooter()
Dim LHeader As String
Dim CHeader As String
Dim LFooter As String
Dim CFooter As String
Dim CBottom As Integer
Dim CRow As Integer
Dim PageSize As Integer

LHeader = "Top Left"
CHeader = "Top Center"
LFooter = "Bottom Left"
CFooter = "Bottom Center"
PageSize = 46

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.PrintArea = ""
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(1)
.RightMargin = Application.InchesToPoints(1)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.Orientation = xlPortrait
End With

CBottom = Range("A16000").End(xlUp).Row

CRow = 1
Do Until CRow CBottom
If CRow Mod PageSize = 1 Then
Rows(CRow).Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
CBottom = CBottom + 2

Cells(CRow, 1).Value = LHeader
Cells(CRow, 4).Value = CHeader
Range(Cells(CRow, 1), _
Cells(CRow, 8)).Interior.ColorIndex = 34
Range(Cells(CRow + 1, 1), _
Cells(CRow + 1, 8)).Interior.ColorIndex = xlNone
CRow = CRow + 2
ElseIf CRow Mod PageSize = PageSize - 1 Then
Rows(CRow).Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
CBottom = CBottom + 2

Cells(CRow + 1, 1).Value = LFooter
Cells(CRow + 1, 4).Value = CFooter
Range(Cells(CRow + 1, 1), _
Cells(CRow + 1, 8)).Interior.ColorIndex = 34
CRow = CRow + 2
Else
CRow = CRow + 1
End If
Loop

LastPageNumber = PageNumber + 1
LastRow = LastPageNumber * PageSize
If CBottom < LastRow Then
Range(Cells(LastRow, 1), _
Cells(LastRow, 8)).Interior.ColorIndex = 34
Cells(LastRow, 1).Value = LFooter
Cells(LastRow, 4).Value = CFooter
End If

CBottom = Range("A16000").End(xlUp).Row

CRow = 2
Do Until CRow CBottom
If CRow Mod PageSize = 1 Then
Cells(CRow, 1).PageBreak = xlManual
End If
CRow = CRow + 1
Loop
End Sub

To change the number of lines per page, just change the value assigned to
the PageSize variable. You can also change what appears in the "header" and
"footer" area by changing what is assigned to the LHeader, CHeader, LFooter,
and CFooter variables.


--
Please remember to indicate when the post is answered so others can benefit
from it later.


"mgrenier" wrote:

I am making a spread sheet and want to print my header and footer in red. i
have used the help option, but couldn't find any thing I could use there. I
am using the 2003 version of Microsoft Excel.

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 do you print colored type in excel 2007? kaye Excel Discussion (Misc queries) 2 December 5th 07 09:14 AM
Excel 2003 headers Kathleen Excel Discussion (Misc queries) 2 June 25th 07 04:49 AM
Excel 2007 worksheet headers do not print Sabrina Excel Worksheet Functions 1 June 12th 06 04:28 PM
Excel 2003 headers ssandee Excel Discussion (Misc queries) 2 January 11th 05 05:16 PM
How do I save data with different colored fonts in EXCEL 2003? tidebelle2 Excel Discussion (Misc queries) 1 December 27th 04 07:59 PM


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

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"