+ Reply to Thread
Results 1 to 2 of 2

Compare columns across worksheets to ensure they match.

  1. #1
    Forum Contributor
    Join Date
    05-19-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    107

    Question Compare columns across worksheets to ensure they match.

    Good Afternoon all,
    I currently have a macro that grabs some date form sheet 3 and pastes it onto sheet which feeds into a pivot table. The problem I am having is that if the worklists names get reorganized on one sheet the data is inaccurate when it is pasted over as the worklists names are not on the same rows. Is there a way to get the macro to check the columns to ensure the information is identical and showing an error message if not before continuing on.

    For Example: Column A of sheet 1 has the alphabet
    A
    B
    C
    D

    Column A of sheet 2 has the alphabet as well but it go out of order.
    D
    B
    C
    A

    I would like the macro to check and make sure column A on both sheets has the same info in each row before copying whatever data I need.

  2. #2
    Registered User
    Join Date
    07-03-2008
    Location
    Hyderabad, India
    MS-Off Ver
    2003 and 2007
    Posts
    58

    Re: Compare columns across worksheets to ensure they match.

    Hi,
    Below is the code for that:

    Copy this code and paste in to one module.

    And change the workbooks path.

    Please Login or Register  to view this content.
    Hope it will more help you!!!

    Regards,
    Last edited by salimudheen; 06-08-2010 at 04:03 AM.
    Salim

+ 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