Automatically insert column headings into Excel worksheet

ilfan83

New Member
Joined
Jan 25, 2005
Messages
5
I am fairly new to Excel programming. Is there a way to insert a set number of column headings, in an Excel worksheet, at the standard page breaks?? This would be for a document that will be used as a template and the same headings would be used for different projects. What I envision is the user would indicate the number of column headings desired in a window that would be displayed when the document is opened.

Is this all possible???

Any assistance would be greatly appreciated.

Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Either set up the sheet as you would like and at the same time record what you are doing by the "record macro" button or just set up the sheet the way you want and get people to use it as a template.
 
Upvote 0
Re: Automatically insert column headings into Excel workshee

Hi tmischler,

I tried recording a macro, but when I used the macro to insert the column headings, the headings were always inserted into the same row (the row where I pasted the headings). Is there a way to manipulate the macro code to have the headings insert into the row where the cursor is on the worksheet??

By the way, I am trying to assist another employee in designing the document. I am fluent in Access, but not Excel.
 
Upvote 0
Are all the other headings going to be in the same position relative to the first?

If so, record the macro again but this time set the recorder to relative reference.
 
Upvote 0
Re: Automatically insert column headings into Excel workshee

The answer to your question is Yes.

How do I use relative reference??

Thanks
 
Upvote 0
when you click on record macro, there is a button next to the blue circle. That is the relative reference button. Click that on / off depending on your needs.
 
Upvote 0

Forum statistics

Threads
1,214,891
Messages
6,122,105
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top