+ Reply to Thread
Results 1 to 5 of 5

Highlight cell in column when compared to each value of another column

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    Västerås, Sweden
    MS-Off Ver
    2010
    Posts
    2

    Highlight cell in column when compared to each value of another column

    Hey,

    I need help with a formula to highlight a cell in a column when comparted to each value in another value. If I have the columns

    A B
    1 1
    1 2
    2 3
    3 5
    4 7
    7 8

    I want the values in column A to be highlighted if the excist in column B, both of the number 1:s.

    Thanks for the help

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Highlight cell in column when compared to each value of another column

    Try this...

    Let's assume the range to highlight is A2:A10.

    Select the *entire* range A2:A10 starting from cell A2.
    Cell A2 will be the active cell. The active cell is the
    one cell in the selected range that is not shaded. The
    formula will be relative to the active cell.

    Goto the Home tab>Styles>Conditional Formatting>
    Manage rules>New rule>Use a formula to determine
    which cells to format

    Enter this formula in the box below:

    =MATCH(A2,B:B,0)

    Click the Format button
    Select the Fill tab
    Select the desired color
    OK out
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    06-25-2014
    Location
    Västerås, Sweden
    MS-Off Ver
    2010
    Posts
    2

    Re: Highlight cell in column when compared to each value of another column

    Thanks for the answer,

    When i try that it only says that the formula contains an error... I had a list from A2-A10 and B2-B10 and copied your formula in the new formatting rule box... Does it work when you type that in to your excel?

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Highlight cell in column when compared to each value of another column

    You might have to use semi-colons instead of commas in the formula:

    =MATCH(A2;B:B;0)

  5. #5
    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: Highlight cell in column when compared to each value of another column

    Replace the comma's in Tony Valko's formula with semi colons.
    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.

+ 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. Replies: 12
    Last Post: 04-11-2014, 07:18 PM
  2. [SOLVED] Cond. formatting a column/Range, highlight cell in column/range if equal to specific text
    By DFrank231 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2013, 03:35 PM
  3. How to highlight cell on column A if they include any of the strings on column B?
    By sami770 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-22-2013, 09:30 AM
  4. Replies: 4
    Last Post: 08-16-2011, 01:03 PM
  5. Highlight empty cell in column C once column A in same row has date entered
    By glyndennett in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2011, 11:16 AM

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