+ Reply to Thread
Results 1 to 3 of 3

how to stop overwriting data with vba

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    51

    how to stop overwriting data with vba

    Hi guys

    I'm having trouble with the finishing touches of my macro. I have a code that identifies if there is is a text in a certain cell & if there is then the macro copies & pastes the whole column of the cell that has the data into another sheet.

    But I plan on adding new columns of data in my original sheet. So when I click the button for the below macro, I dont want it to delete my previous entries. Basically I want to keep a record of all archived data.

    Does that make sense?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: how to stop overwriting data with vba

    So when I click the button for the below macro, I dont want it to delete my previous entries
    Are you talking about the Archive sheet? Instead of copying the data to a hardcoded column (i) find the last column dynamically.
    Please Login or Register  to view this content.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: how to stop overwriting data with vba

    Thanks for the reply but its not quite what I need.

    So for example There is a whole heap of data in sheet WB2. When a person enters data in a particular cell (Cell39) then the macro will copy the whole column of the cell that contained the data and paste it into sheet WB3 (archive) & the record is deleted in WB2. However people will continue adding new data to WB2. So when the macro is run I dont want it overwriting the previous entries into WB3(archive)

    I hope that makes sense =/

+ 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