+ Reply to Thread
Results 1 to 5 of 5

VBA to re-name every first sheet and fill column header from P To U

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    washington
    MS-Off Ver
    Excel 2019
    Posts
    168

    VBA to re-name every first sheet and fill column header from P To U

    Dear experts

    I have multiple workbooks stored in particular path folder like Jan,Feb,...etc i want rename of every first sheet of each workbook as RPI and fill column header from P1 to U1 With those text values.

    P1 = StateCode
    Q1= Product Sub-Category
    R1=Product Name
    S1 = Product Container
    T1 = Product Base Margin
    U1 = Ship Date

    path is C:\Users\Admin\Desktop\Brooke\Foxstreet\Jan,Feb,Mar,Apr,....xlsb files

    all workbooks first sheet name get differ from one to another so take only first sheet Changes made in same first sheet only not newsheet. I want run macro from blank workbook module

    this is path where i saved all workbooks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: VBA to re-name every first sheet and fill column header from P To U

    Do you have other excel files in that folder that you do not want modified? If not, try this:

    Please Login or Register  to view this content.
    Last edited by spitfireblue; 05-24-2016 at 01:39 AM.
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of others.

  3. #3
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: VBA to re-name every first sheet and fill column header from P To U

    Try this
    It will amend all files with extension .xlsb in the given folder

    Paste this code into a standard module
    Please Login or Register  to view this content.
    If a response has helped then please consider rating it by clicking on *Add Reputation below the post
    When your issue has been resolved don't forget to mark the thread SOLVED (click Thread Tools at top of thread)

  4. #4
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: VBA to re-name every first sheet and fill column header from P To U

    @Kevin#
    I think that:
    Please Login or Register  to view this content.
    should be
    Please Login or Register  to view this content.
    I love the file list at the end... I need to use that more often.

  5. #5
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: VBA to re-name every first sheet and fill column header from P To U

    @spitfireblue Yes you are correct.
    (I amended it as I replied - different in original)

    Glad you like the file list. I often build up a message string. Very useful when building VBA too - used well it gives you a lot of info quickly in one place

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] need vba to fill values under particular header from master sheet
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-26-2016, 06:16 AM
  2. [SOLVED] lookup data from origin sheet to new sheet with switch column header.
    By kimudao in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2015, 09:44 AM
  3. [SOLVED] copy one column to other column without header in same sheet
    By kimudao in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-24-2015, 04:01 AM
  4. Replies: 1
    Last Post: 10-05-2013, 03:35 PM
  5. Using EXCEL VBA to create word ,insert header in word, add textbox in header and fill pic
    By xiaorenwuhyl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-28-2013, 05:32 AM
  6. Replies: 3
    Last Post: 05-27-2010, 10:57 AM
  7. Fill Row Header based on cell in column
    By diggerd in forum Excel General
    Replies: 2
    Last Post: 01-06-2010, 09:59 PM

Tags for this Thread

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