+ Reply to Thread
Results 1 to 8 of 8

Compare new sheet vs old and extract data from old sheet into new sheet.

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    7

    Compare new sheet vs old and extract data from old sheet into new sheet.

    Hi
    I have two Workbooks. One old large Workbook with almost 4000 lines in the row. And an new one with almost 4500 lines.
    OldWorkbook:
    Text in Column A and B is unique and belongs together.
    The text in C is either empty or a more thorough explenation of what is written in B.
    The check marks in D to H is done so I know who should have the text and id. And also so Not everyone needs to read through all the information in A and B.

    But unfortunatly know I have a newWorkbook:
    The new one only have information in A and B column. But not all of them are the same as in the old Workbook.
    Some of them is also rewritten in the text field.
    This sheet does not have any of the information in C to H column.

    So I am trying to have at vba that can check the new workbook against the old one. If A and B in the new matches the A and B somewhere down the column. It shall copy all the added text and options in C to H from the old to the new one.
    Additionaly I need it to create a new check mark in I column if A and B was the same in both sheets.
    In that way I will end up with all the added information from the old workbook into the new one as long as nothing was changed.
    And then I can later filter with the check mark in I column and go over the ones that did not match and verify and add information to them in the end. This will save me from maybe checking 3800 of the 4500 lines.

    I have attached some simple examples of the workbooks to show about how they look like.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Compare new sheet vs old and extract data from old sheet into new sheet.

    Hi Anders,

    You'll need to fix the book names to be exactly correct - (see red code), and try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    03-12-2014
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Compare new sheet vs old and extract data from old sheet into new sheet.

    Thanks.
    That worked great on the test examples. I will test it on the real documents tomorrow morning Norwegian time.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Compare new sheet vs old and extract data from old sheet into new sheet.

    You're welcome!

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Compare new sheet vs old and extract data from old sheet into new sheet.

    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  6. #6
    Registered User
    Join Date
    03-12-2014
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Compare new sheet vs old and extract data from old sheet into new sheet.

    Is there a limitation on how much text there can be in a cell in this script. Couse i get a Run-time error '13': Type mismatch. This happens about 5 rows down. and that cell has a lot of text. when I remove some of the text it runs fine.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Compare new sheet vs old and extract data from old sheet into new sheet.

    You're welcome and thanks for the rep!



    There is a nominal limit of 255 characters to a cell - what is the text?

  8. #8
    Registered User
    Join Date
    03-12-2014
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Compare new sheet vs old and extract data from old sheet into new sheet.

    The text is spesifications. Basicly it can be from a couple of senteces to about 500-1000 characters.

+ 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. [SOLVED] extract and split data in one cell from one sheet to another sheet in two cells in vba
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-16-2017, 08:21 AM
  2. Replies: 3
    Last Post: 12-15-2015, 05:04 PM
  3. Replies: 30
    Last Post: 08-17-2015, 01:18 AM
  4. [SOLVED] Desire data extract from the sheet “input” to the sheet “output”
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-24-2014, 02:19 PM
  5. Replies: 6
    Last Post: 04-22-2014, 11:32 AM
  6. Replies: 5
    Last Post: 09-24-2009, 03:46 AM
  7. Replies: 1
    Last Post: 02-22-2006, 03:55 PM

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