LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Column Headings Repeating

I have the following code which changes column headings. I'd like it to
repeat over the 8 sheets I have. I think I'm missing a "Next" statement but
not sure where.

Thanks.

Sub namefixer()
Dim X As Long
Dim Sh As Variant
For Each Sh In Array("BOOK_PrecBallMatches", "SHIP_PrecBallMatches", _
"Book_Lin_Bearing_Matches", "Ship_Lin_Bearing_Matches",
"Book_ProfRailMatches", _
"Ship_ProfRail_Matches", "Book_60_CaseMatches", "Ship_60Case_Matches")
s = Array("CustType", "Duns", "Name", "Jan-2004", "Feb-2004", _
"Mar-2004", "Apr-2004", "May-2004", "June-2004", "July-2004", _
"Aug-2004", "Sept-2004", "Oct-2004", "Nov-2004", "Dec-2004", _
"Jan-2005", "Feb-2005", "Mar-2005", "Apr-2005", "May-2005", _
"June-2005", "July-2005", "Aug-2005", "Sept-2005", "Oct-2005", _
"Nov-2005", "Dec-2005", "Jan-2006", "Feb-2006", "Mar-2006", _
"Apr-2006", "May-2006", "June-2006", "July-2006", "Aug-2006", _
"Sept-2006", "Oct-2006", "Nov-2006", "Dec-2006", "Jan-2007", _
"Feb-2007", "Mar-2007", "Apr-2007", "May-2007", "June-2007", _
"July-2007", "Aug-2007", "Sept-2007", "Oct-2007", "Nov-2007", _
"Dec-2007", "Jan-2008", "Feb-2008", "Mar-2008", "Apr-2008", _
"May-2008", "June-2008", "July-2008", "Aug-2008", "Sept-2008", _
"Oct-2008", "Nov-2008", "Dec-2008")

Range("A1:BK1") = s
Next
End Sub
--
Bob
 
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
repeating column headings Fran Excel Discussion (Misc queries) 2 April 5th 07 06:44 PM
Repeating Column Headings TJ Excel Discussion (Misc queries) 1 August 1st 06 06:22 PM
Repeating Column headings TJ Excel Discussion (Misc queries) 0 July 31st 06 04:26 PM
Repeating headings ace_stace Excel Worksheet Functions 4 April 7th 06 01:57 PM
Repeating Columns Headings TS Excel Discussion (Misc queries) 1 December 6th 05 09:30 PM


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