+ Reply to Thread
Results 1 to 6 of 6

Format a cell based on values in that row

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    Arlington, TX
    MS-Off Ver
    Excel 2010
    Posts
    47

    Format a cell based on values in that row

    Column B contains the individual cells I want to color if there is a "2" anywhere in each of those cells rows. For instance, if row 20 has a series of numbers, but not the number "2", I don't want it colored. If row 21 does have a cell in that row with the number "2", I do want it colored.

    I attached a photo illustrating this. My problem is I can't find a way to set the conditional formatting in bulk. I can do it if I want to duplicate the rule 5 million times, 1 per row.

    Any help is appreciated!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Format a cell based on values in that row

    You almost have it..

    The formula should be written relative to the Active Cell.
    The active cell is currently A239 as shown in the name Box at the top left.

    And the formula should only refer to that single row, not the entire range of rows. You set the "refers to range" to the entire range..
    And finally, the "2" should be just 2 <- no quotes.

    Try

    =COUNTIF($F239:$OA239,2)


    Oh, and an actual Excel Document attachment is preferred over pictures...

  3. #3
    Registered User
    Join Date
    07-30-2012
    Location
    Arlington, TX
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Format a cell based on values in that row

    Thanks for this- so how would I duplicate this rule to highlight any of the cells in column B whose row contains a 2 without doing it 1 by 1?

    What my end goal is to try to find and highlight any row that has a discrepancy (the #2) and highlight the cell for that row.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Format a cell based on values in that row

    Highlight the ENTIRE Range first....
    Then go to conditional formatting
    Write the formula relative to the activecell shown in the Name Box
    But the formula still only refers to that 1 row.
    It will automatically incriment the row # among all the rows you selected first.

  5. #5
    Registered User
    Join Date
    07-30-2012
    Location
    Arlington, TX
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Format a cell based on values in that row

    Perfect- thanks for your help.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Format a cell based on values in that row

    You're welcome.

+ 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. [SOLVED] Data Validation format length based on values in another cell
    By rini11 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-16-2013, 11:18 AM
  2. [SOLVED] Condtionally format an entire row based on adjacent cell values
    By Martinp217 in forum Excel General
    Replies: 8
    Last Post: 05-24-2013, 01:54 PM
  3. [SOLVED] Need Macro to Format Cells based on corresponding cell values
    By feckoffcup in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-14-2012, 04:29 PM
  4. Format cell color based on multiple cell values
    By Zenaida in forum Excel General
    Replies: 3
    Last Post: 05-09-2006, 06:56 PM
  5. Format cell based on adjacent cells values
    By the majestic ferny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2005, 02:35 PM

Tags for this Thread

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