+ Reply to Thread
Results 1 to 4 of 4

How to combine several tabs, delete first six rows and need to add one column with date

  1. #1
    Registered User
    Join Date
    10-12-2013
    Location
    hk
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question How to combine several tabs, delete first six rows and need to add one column with date

    Hi, all

    I need to merge the attendance record monthly. I.e. for Feb 2018, will get 28 worksheets in one file. I want to:

    1. Keep the heading (first 6 rows), show one time is enough;
    2. Add the column with date in the first column, around 100 records per tab (each tab is the date as tab name)

    Please advise. Thanks

    Mon

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How to combine several tabs, delete first six rows and need to add one column with dat

    the date column parameters are a little vague, but try this, assuming the source workbook Is the active workbook and is open and code is not in that workbook. The workbook containing the code must be saved as a macro enabled workbook.
    Please Login or Register  to view this content.
    This code can be improved by giving the workbooks and sheets some actual names.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    10-12-2013
    Location
    hk
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: How to combine several tabs, delete first six rows and need to add one column with dat

    HI, JLGWhiz

    Attached please find my data file for your reference. I copied and paste the VBA code under the worksheet but not work. Please assist. As I am the beginner of VBA, still need to time to understand. Thanks

    For the merge page:

    (1) Need the first six column header
    (2) Combine A7 or below data
    (3) Insert the column in the left hand side of A1 with date from A1 to column end (the date already shown in the tab name).

    Hope it is clear. Thanks for your kind advice.

    Mon

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How to combine several tabs, delete first six rows and need to add one column with dat

    Quote Originally Posted by mon123 View Post
    HI, JLGWhiz

    Attached please find my data file for your reference. I copied and paste the VBA code under the worksheet but not work. Please assist. As I am the beginner of VBA, still need to time to understand. Thanks

    For the merge page:

    (1) Need the first six column header
    (2) Combine A7 or below data
    (3) Insert the column in the left hand side of A1 with date from A1 to column end (the date already shown in the tab name).

    Hope it is clear. Thanks for your kind advice.

    Mon
    It will not open the attached file. But I tested the code before I posted it and it ran as expected. See my comment about using the actual workbook and sheet names. Also, make sure the code is copied to the standard code module1. If it produces an error, note the error message and the line of code highlighted when you click the 'Debug' button. Then post that information back here for analysis.

+ 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. Delete rows based on matching dates in Sheet1 Column A with date in Sheet2 Cell K1
    By robertaw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2015, 02:30 PM
  2. Replies: 7
    Last Post: 03-13-2015, 05:34 PM
  3. Delete Rows if Date in Column A is Older Than 6 Years
    By BantamPCI in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-12-2014, 06:13 AM
  4. Combine data on multiple tabs having variable number of rows
    By noorie007 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-27-2014, 05:20 PM
  5. Delete rows in separate tabs if string in column A matches
    By bonsaitrees in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-14-2012, 03:43 PM
  6. Combine comments from four tabs into one column.
    By Johnmitch93 in forum Excel General
    Replies: 13
    Last Post: 03-24-2012, 02:58 PM
  7. Replies: 3
    Last Post: 09-15-2011, 07:26 AM

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