+ Reply to Thread
Results 1 to 4 of 4

Compare column B - If exists then update date, else copy to end

  1. #1
    Registered User
    Join Date
    08-24-2010
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    29

    Compare column B - If exists then update date, else copy to end

    Hi all

    I am looking for some help with a macro. I am looking to use the value in column B on sheet 1 to check if they exist on sheet 2 column B. If they do exist then copy the data from sheet 1 to sheet 2 in order to update the data. If the data does not exist then copy the data to the end of the data on sheet 2. I am trying to consolidate some reports so need to copy the data as is. So on finding a match only copy the data on the row, in the example columns A to D, not the full row as this would upset the data that will be on my proper data.

    Many thanks for any help in advance

    Jim
    Attached Files Attached Files
    Last edited by jimbob121; 08-06-2011 at 02:23 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Compare column B - If exists then update date, else copy to end

    This should do it:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Compare column B - If exists then update date, else copy to end

    Jim,

    Something like this?
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  4. #4
    Registered User
    Join Date
    08-24-2010
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Compare column B - If exists then update date, else copy to end

    tigeravatar and JBeaucaire

    Both codes work very well. Should be able to adapt.

    Many thanks to both of you!!

+ 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