+ Reply to Thread
Results 1 to 8 of 8

compare columns and highlight

  1. #1
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    compare columns and highlight

    Hi,
    I have two sheets, sheet1 and sheet2.
    In column D in sheet1, I want to check every row's value is in column M in sheet2.
    In column D in sheet1 has city name and in column M in sheet2 has city name too.
    I want to compare if city name in column D in sheet 1 is in the column M in sheet2.
    IF I find a row in column D has not in column M in sheet2, I want to highlight the row in sheet 1.

    How can I do this?
    Thanks in advance.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: compare columns and highlight

    Hi Goodstart14,

    This sounds like you need a CountIf() formula in a Conditional Formatting dialog on sheet 1. If you attach a sample workbook we can deal with a real problem. To attach a sample, click on "Go Advanced" and then the Paper Clip Icon above advanced message area.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: compare columns and highlight

    Hi,

    Use

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If there is no match the function will return #N/A

    If you want to highlight those rows then use a conditional format with the Column D error value as the criteria for painting the row.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    Re: compare columns and highlight

    I entered your formula in conditional formatting, but it didn't return anything.
    error value as the criteria
    How can I do this?

    Thanks

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: compare columns and highlight

    Hi,

    My formula wasn't a conditional format formula.

    It's a formula that should go in a helper column in order to identify the items that don't exist. The conditional format formula is completely separate (and different) which will then be applied to this helper column to paint the cells/rows as necessary.

  6. #6
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    Re: compare columns and highlight

    Thanks.
    I tried this and that , but it didn't work. What should I enter in conditional format?
    Thanks

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: compare columns and highlight

    Hi,

    Use the 'Use a Formula to determine which cells to format and add

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    where A1 is the first cell in the helper column and apply the CF to the whole of helper column A - in this example (or if you prefer the whole of the range of rows that you want to paint). Change A as necessary.

  8. #8
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    Re: compare columns and highlight

    Thanks.
    I got 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. Compare/Highlight Two Columns
    By mikayluh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-26-2015, 03:33 PM
  2. [SOLVED] compare 2 columns, highlight color if not same value?
    By ChristopherH in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-26-2014, 12:48 PM
  3. Compare Columns and Highlight
    By lkurrt in forum Excel General
    Replies: 2
    Last Post: 09-19-2013, 02:21 PM
  4. Compare 2 columns and highlight the new value,
    By fpolaco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2012, 02:22 PM
  5. Replies: 2
    Last Post: 01-26-2012, 12:04 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