+ Reply to Thread
Results 1 to 5 of 5

Copy header row and add titles

  1. #1
    Registered User
    Join Date
    12-13-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Copy header row and add titles

    I have a spreadsheet with sections of data sorted alphabetically by the word (such as "Open", "Closed", "Pending" etc) that's in column F. When the word in column F changes, I have a macro that adds a blank row between them so that the sections are divided. Before each new section of data, I want to do the following:

    * Copy the header in row 1 to each of the data sections for ease of reading the data.
    * Add row with a title word in Column A above the new header row for each section. This title word should be whatever populates in column F for that section.

    How would I do this in a macro?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    re: Copy header row and add titles

    Hi Noobette,
    Welcome to the forum.

    Have you tried using your macro recorder to see what the code looks like?

  3. #3
    Registered User
    Join Date
    12-13-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    re: Copy header row and add titles

    Hi Dave,

    I've tried the recorder but my data changes each time I pull it from this program and dump it into Excel. So setting a constant place for the headers for instance doesn't work.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    re: Copy header row and add titles

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Please don't use abbreviations lin your thread title
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    12-13-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Copying header row and adding a title word to sections of data

    Gee Roy, it was a typo. My cursor must have goofed and moved the "wo" to the front of the title.

    "woCopying header row and adding a title rd to sections of data"

    Is now "Copying header row and adding a title word to sections of data"

    Any chance you've got some coding help for my macro here Roy? Apologies in advance of any spelling errors or typos that may be in this post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1