+ Reply to Thread
Results 1 to 4 of 4

Highlighting Cells if Specific Data Appears in Adjacent Cells

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    43

    Highlighting Cells if Specific Data Appears in Adjacent Cells

    Hello,

    I have a couple of spreadsheets that has several columns each containing several hundred thousand rows of codes. To quickly analyze this data, I am trying to come up with a conditional formatting formula to highlight the respective cells when specific values occur next to each other. A particular code will show up in many cells, but the code that is the respective adjacent cell is always different. I need to know when row A contains, for example, '9928559' and row B contains '36415RT'.

    Thank you for any help!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    22,745

    Re: Highlighting Cells if Specific Data Appears in Adjacent Cells

    Use this formula in the conditional formatting dialogue box:

    =AND($A2="9928559",$B2="36415RT")

    assuming the cell you want to highlight will be on row 2 - use the Format Painter to apply the same CF to other cells.

    It is not clear if '9928559' is meant to be a number or a text value - I assumed a text value as these are codes, but if it is a numeric value then omit the apostrophes from that part of the formula.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-17-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: Highlighting Cells if Specific Data Appears in Adjacent Cells

    Thanks Pete, that works!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    22,745

    Re: Highlighting Cells if Specific Data Appears in Adjacent Cells

    That's good to hear - thanks for feeding back (and for the rep).

    Pete

+ 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: 4
    Last Post: 01-13-2014, 08:13 AM
  2. [SOLVED] VBA Code for highlighting cells if it appears elsewhere
    By mpgates in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-11-2013, 02:28 AM
  3. Highlighting value if appears in 3 adjacent columns (across different rows)
    By Magoose in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2013, 11:49 AM
  4. Replies: 7
    Last Post: 12-04-2012, 06:23 AM
  5. [SOLVED] Highlighting Specific Cells
    By mrj1701 in forum Excel General
    Replies: 3
    Last Post: 08-29-2005, 05:05 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