Rename header rows based on excel workbook names
Results 1 to 2 of 2

Thread: Rename header rows based on excel workbook names
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jul 2019
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Rename header rows based on excel workbook names

    Hello
    I have hundreds of separate excel workbooks saved in a single folder. Each workbook has the same set of 28 variables with the same header row titles and contains monthly data on the cost of drugs. I want to run a loop to merge these workbooks into one. There are two main issues (1) the first column contains the drug code which I want to match each workbook on in the master excel workbook (and additional drug codes can be added each month), and (2) the headers are all the same but I want to rename these by the excel workbook name before merging into the master excel workbook so that I have the the header rows as variable_a_jan_2018, variable_a_feb_2018, etc. Is it possible to run an excel macro loop to achieve this?
    Any help would be greatly appreciated

  2. #2
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,933
    Post Thanks / Like
    Mentioned
    21 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Rename header rows based on excel workbook names

    Hi,
    welcome to forum

    have a look here:https://docs.microsoft.com/en-us/pre...4(v=office.12)

    and see if Ron's article goes someway in meeting your requirement.

    Dave

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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