+ Reply to Thread
Results 1 to 2 of 2

Update row if ID exists

  1. #1
    Registered User
    Join Date
    12-03-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    18

    Update row if ID exists

    I have a code that goes through multiple workbooks and copies over any rows to a master file that do not exist. I would like to add to this by updating a row if the value does exist in column A on the master (copying A - K from File to MasWB). Below is a copy of one of the loops. Can you please help me add so that I can update rows that already exist? I feel like it should be straight forward.

    Please Login or Register  to view this content.
    Last edited by ExelTime; 02-15-2021 at 03:50 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Update row if ID exists

    Try add in an Else to the If statement in the code for it copy the data from 'Sheet1' to the row the ID was found in rather than a new row.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

+ 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. Check if specific file exists, and update cells based on this
    By lawrence24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-18-2017, 07:35 AM
  2. [SOLVED] Use XL VBA to update Access record if it already exists
    By GCW esq in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-14-2016, 01:17 AM
  3. Excel VBA: Update rec if it exists, add record if it doesn't
    By RLCornish in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-08-2014, 04:06 PM
  4. [SOLVED] Find if filename exists and update variable within the filename structure
    By Lungfish in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-18-2013, 02:42 AM
  5. Clear Contents on Update when other code exists in the Worksheet_Change thingy
    By JRS_ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2011, 12:11 PM
  6. Compare column B - If exists then update date, else copy to end
    By jimbob121 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2011, 02:21 PM
  7. Update UDF if path exists
    By Zaeguzah in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2010, 03:28 AM

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