+ Reply to Thread
Results 1 to 7 of 7

Overwrite existing data

  1. #1
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Post Overwrite existing data

    Hi,
    I have the following macro with me which is working fine. But the problem is whenever I run this macro it is duplicating the data again and again.
    I dont want that. If the data is already existing in the sheet it should copy only the new data from the original file.

    Please help me
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 01-21-2012 at 04:50 PM. Reason: Added Code Tags

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: How to overwrite existing data using macros

    Hi kishoremcp

    do you mean
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Re: How to overwrite existing data using macros

    I am sorry, I am new to excel and macros. I Executed the macro.It works but the output varies a lot.
    Please help me again.
    Please assume that I have some data in the new sheet PCSAT and after that I am running the macro from a main data sheet which contains the old entries as well as some new entries. I want the new entries only to copy to PCSAT. Not the old data again because it is giving a duplicate copy of the data which is already copied when the macro is run for the first time.
    I hope you understand my problem.
    Sorry for the trouble and Thanks for your help.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: How to overwrite existing data using macros

    try....
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Re: Overwrite existing data

    I am getting an error. Cannot execute. Break in code.

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Overwrite existing data

    which line?

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Overwrite existing data

    try this code and just change the sheet names to suit
    Please Login or Register  to view this content.

+ 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