+ Reply to Thread
Results 1 to 8 of 8

Macro to Insert Column Heading to all Worksheet

  1. #1
    Registered User
    Join Date
    11-27-2008
    Location
    Manila, Philippines
    Posts
    20

    Macro to Insert Column Heading to all Worksheet

    Hi.

    Pls help me do a macro that upon clicking a button it will copy and paste a column heading (located in Row1 of Sheet1) to all non-empty worksheets (Sheet 2 to Sheet N) in the workbook simultaneously. Note that each worksheet has no column heading and has the same number of columns as that of the column header in Sheet1. Worksheet 2 to Worksheet N contains data extracted daily.

    Im a newbie in macro programming.so i really needed your help ASAP. Thanks in advance.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    When you say that you want it copying to non empty sheets is there data in Row 1 of these sheets?
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-27-2008
    Location
    Manila, Philippines
    Posts
    20
    Quote Originally Posted by royUK View Post
    When you say that you want it copying to non empty sheets is there data in Row 1 of these sheets?
    YES. the data starts in ROw 1 of each sheets.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    So you need to insert a row before copying. This will add the contents of row 1 in the active sheet to each sheet after inserting a row
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862
    Inserting a header only if the sheet is not empty ...
    Please Login or Register  to view this content.
    Hope that helps.
    Last edited by MatrixMan; 11-28-2008 at 08:56 AM. Reason: typo
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

  6. #6
    Registered User
    Join Date
    11-27-2008
    Location
    Manila, Philippines
    Posts
    20
    Quote Originally Posted by royUK View Post
    So you need to insert a row before copying. This will add the contents of row 1 in the active sheet to each sheet after inserting a row
    Please Login or Register  to view this content.
    Hi.

    It works!. Thanks a lot! More power and have a nice weekend!

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Please mark the thread solved & rate the answer(s)

  8. #8
    Registered User
    Join Date
    11-27-2008
    Location
    Manila, Philippines
    Posts
    20
    thanks Again!
    Last edited by RAparente; 12-01-2008 at 11:04 PM. Reason: SOLVED!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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