LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default writing the column names in first row, based on the sheet name

I am new to programming. This site has been very helpful for me. I am
learning as I am working.
I would need to write a macro to name columns based on the sheet name.
This code will run through all the sheets in the workbook and fill the first
row, based on the sheet name.

If sheetname name is €œname1€ then column names are ( €œCol1€, €œCol2€, €œCol3€)
( these will be written in the first row)
Else if sheetname is €œname2€ then column names are (€œsome1€ €œsome2€)

Could someone please give me a sample template of code. I am thinking of
select case statement. But do not know how to write this in VBA code.

Thank you very much for you help in advance

sheela


 
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
Based new sheet names on cell value J.W. Aldridge Excel Programming 0 June 24th 09 01:59 PM
Change sheet names based on cell contents Jim G Excel Programming 6 June 19th 09 11:47 AM
Add data to 2007 table based on column names? Tara H Excel Programming 0 May 28th 09 01:26 PM
Dynamic list based on sheet names sgltaylor Excel Programming 2 September 12th 08 02:40 PM
Find a time value in one column based on names in another Robert Excel Discussion (Misc queries) 1 January 6th 06 01:33 PM


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