+ Reply to Thread
Results 1 to 6 of 6

Compare two columns in two different spreadsheets and Highlight difference

  1. #1
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Compare two columns in two different spreadsheets and Highlight difference

    Hi

    My request is

    1) To compare one column A in sheet1 with column A in sheet 2 , once the value of both are equal, then compare Column B of sheet1 and column B of Sheet2, if they are same , do nothing but if they are different , Highlight it with a colour.

    2) If the value in column A of sheet 1 is not present in the column A of sheet 2 , then show "New Entry"

    Kindly help me with a macro or some formula which can give these results. Spreadsheet attached.

    Thanks a lot for your help

    Regards
    Shilloh
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Compare two columns in two different spreadsheets and Highlight difference

    Hi shilloh

    1) You can do it, using a helper column(that you can hide it, if you like) and using countif & if&and functions.

    =IF(AND(Sheet2!$A$2:$A$8=A2;Sheet2!$B$2:$B$8=B2);COUNTIF(Sheet2!$B$2:$B$8;B2);"")

    Then in column b, use a simple conditional formatting.

    2) In column C(Sheet2) use the formula:

    =IF(A2<>Sheet1!$A$2:$A$8;"NEW ENTRY";A2& "EXIST IN Sheet1!")

    You can add a conditional formatting if you like to it!

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Compare two columns in two different spreadsheets and Highlight difference

    Hi Fotis

    Thanks for your quick response. It works fine when the order of column A doesnt change in both the sheets. But i have a slightly different requirement, if the order in Column A is different in both the sheets, im unable to get the results.

    Ive attached the table. Should we use vlookup?

    Thanks in advance
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Compare two columns in two different spreadsheets and Highlight difference

    Hi

    ..Not sure if i get your new point..

    If i understoond well, then in Sheet2!E2, use the formula.

    =INDEX(Sheet1!$B$2:$B$8;MATCH(A2;Sheet1!$A$2:$A$8;0))

    Is this are you looking for???
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Compare two columns in two different spreadsheets and Highlight difference

    Hi Fotis

    This is exactly what I wanted, Thanks a lot!

    Regards
    Shilloh

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Compare two columns in two different spreadsheets and Highlight difference

    You are welcome. Glad to helped you.

    So if you found your solution, pls mark the Thread, as SOLVED.

+ 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