Hey, I have a worksheet that contains a bunch of data, but I want to have a script that will move all of the data down one row and then insert column headings at the top say "example1", "example2", etc. Does anybody have any idea how to do this?
Hey, I have a worksheet that contains a bunch of data, but I want to have a script that will move all of the data down one row and then insert column headings at the top say "example1", "example2", etc. Does anybody have any idea how to do this?
Hello Bm4466,
Here are 2 macros: Onr to insert the header row and one to insert the column header in the column you want. Add a Stabdard VBA Module to your Workbook and the copy and paste the code into it.
Example:Please Login or Register to view this content.
Call AddHeaderRow first and then AddHeader as many times as needed...
Call AddHeaderRow
Call AddHeader "Example1", "A"
Call AddHeader "Example2", "D"
This adds the header "Example1" to column "A" and "Example2" to column "D".
Sincerely,
Leith Ross
Thanks, I appreciate it, will that add those strings to the first row and move the other rows down one?
This is the way I've done this in the past:Originally Posted by bm4466
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks