+ Reply to Thread
Results 1 to 8 of 8

Comparing two sheets for differences

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    200

    Comparing two sheets for differences

    Hi There

    Please could someone help me compare two sheets.

    i have two sheets, "day 1" and "day 2"
    in these sheets i have two columns, A and B

    Column A has a list of account numbers
    Column B has "L" or "C" (Live or Closed)
    every day i get a new report of the account numbers, and what i want to see if
    there are any differences in the "L" or "C" the only problem is, the account numbers are not always in the same order on each report. so i need a macro that will tell me where the "L" or "C" has changed against the corresponding account number.


    Many thanks in advance

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Comparing two sheets for differences

    Maybe:

    Please Login or Register  to view this content.
    Code should highlight changes on Day 2.

  3. #3
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    200

    Re: Comparing two sheets for differences

    Will test this, thank you.

  4. #4
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    200

    Re: Comparing two sheets for differences

    works perfectly up untill this part

    For Each cell In Range("C2:C" & ActiveSheet.UsedRange.Rows.Count)
    If cell.Value <> cell.Offset(, -1).Value Then cell.Offset(, -1).Interior.ColorIndex = 6


    get a "type mismatch" error, there are some cells that dont have L or C dont know if that effects anything

    thanks

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Comparing two sheets for differences

    Can you attach a sample file? I can't duplicate your error on this end.

    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

  6. #6
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    200

    Re: Comparing two sheets for differences

    Hi
    will attach shortly, problem is there is 400k rows, so im just making it a bit smaller

    thanks.

  7. #7
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    200

    Re: Comparing two sheets for differences

    Seems to be working now.


    thank you John

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Comparing two sheets for differences

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.


    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ 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. Comparing two worksheets and identifying differences
    By sarahrose20 in forum Excel General
    Replies: 4
    Last Post: 07-24-2012, 08:26 AM
  2. Comparing differences between two columns
    By MI_Analyst in forum Excel General
    Replies: 1
    Last Post: 11-02-2010, 06:51 AM
  3. Comparing sheets, finding and referencing differences
    By churtis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2010, 08:02 AM
  4. Comparing columns and highlighting differences
    By Sejrup in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-01-2010, 09:24 AM
  5. [SOLVED] Comparing two data ranges for differences.
    By jason.r.swinehart in forum Excel General
    Replies: 0
    Last Post: 01-12-2006, 03:55 PM

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