+ Reply to Thread
Results 1 to 3 of 3

Overwrite existing record

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Overwrite existing record

    Hi, I am a newbie...

    I need to simply overwrite an existing record (row) in a dedicated workbook (db) with data copied from another workbook. The copied data has 234 fields with the first being a unique serial no.

    I have code that currently pastes the record data into the next available row in the db workbook. This is fine until I need to update an existing record when I inevitably end up with a duplicate. Can someone please let me have the code that will find the existing record (if any) and overwrite it with the new data fields and if not existing paste in the next available row. It would be good if a message pops up before pasting warning the user that the record will be overwritten.

    Your help would be greatly appreciated.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Overwrite existing record

    Hi, bryan1706,

    any information on names of the workbook or the sheet might have been helpful. The code is copying into the specified workbook and sheet (change to suit) and should have the workbook with the data to be pasted as active workbook:

    Please Login or Register  to view this content.
    I have code...
    It might have been a good idea to post that code.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Overwrite existing record

    Why not use a database?

+ 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