+ Reply to Thread
Results 1 to 5 of 5

Macro for Appending Data without Header to a database with header

  1. #1
    Registered User
    Join Date
    03-03-2006
    Posts
    4

    Need Macro to append data without header to a database with header

    I am facing problem to append 1st batch of data without Header to a empty database with header. After that, 2nd batch of data will need to be appended after the last row of 1st batch data.

    Could anyone help me on the macro?
    Last edited by tiang1209; 03-29-2007 at 03:04 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    1) What sort of database? Spreadsheet, Access???
    2) Is the data in the same structure as the database, or does it have to be manipulated.
    3) Where is the data coming from.


    rylo

  3. #3
    Registered User
    Join Date
    03-03-2006
    Posts
    4
    Hi,
    1. It's a Spreadsheet database.
    2. The raw data contains same structure as the database. I have run another macro to manipulate the data.
    3. The data come from another workbook.

    The macro below is to append the raw data to the database.
    However the command in red color will have error when the database with header is empty.
    Let's say 1st day, I need to start to add my raw data to a new database with header.
    2nd day onwards, I need to append new raw data to the database with contains the 1st day raw data.
    The following code in red not working.

    Rows ("2.2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Workbooks.Open Filename:="C:\Master.xls"
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Select

    ActiveSheet.Paste
    Last edited by tiang1209; 03-29-2007 at 09:12 PM.

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    for the code in red try

    Please Login or Register  to view this content.
    Assumes that you will automatically open to the sheet that will receive the data.


    rylo
    Last edited by rylo; 04-01-2007 at 08:23 PM.

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please read forum rules below and then wrap your code

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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