+ Reply to Thread
Results 1 to 2 of 2

Copy and paste to new worksheet but overwrite if data already exists.

  1. #1
    Registered User
    Join Date
    04-28-2015
    Location
    USA
    MS-Off Ver
    2007
    Posts
    2

    Copy and paste to new worksheet but overwrite if data already exists.

    Hello all... First time posting.

    I need help with vba code that I am currently working on. I need to be able to take data from a range in a worksheet and copy the data to a new worksheet. I have been able to successfully create this code. However, I also need to be able to validate whether the data already exists in the workbook being copied to. If the data exists, it should overwrite the existing data. If the data does not exist, then it should paste the data in the next available row. I have the copy and paste functionality working. I just need help with the overwriting validation. Any help would be greatly appreciate. See my code below:


    Please Login or Register  to view this content.
    Last edited by digimon; 04-28-2015 at 11:15 PM.

  2. #2
    Registered User
    Join Date
    04-28-2015
    Location
    USA
    MS-Off Ver
    2007
    Posts
    2

    Re: Copy and paste to new worksheet but overwrite if data already exists.

    I found the following code which seems to have the desired effect. It deletes any duplicates. The problem with the code is that it deletes from the bottom up. How can I get this code to delete from the top down?

    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)

Similar Threads

  1. Replies: 9
    Last Post: 12-19-2014, 11:12 PM
  2. Copy Data from One worksheet to Another without Overwrite
    By vinu1984 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2013, 02:15 PM
  3. [SOLVED] Copy/Paste from a Filtered Range and Insert copied data NOT overwrite
    By Simon.Ward in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-12-2013, 11:14 AM
  4. Replies: 4
    Last Post: 10-25-2012, 05:09 PM
  5. Macro to copy sheet from closed work book and overwrite if sheet already exists
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-23-2009, 06:36 PM

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