+ Reply to Thread
Results 1 to 6 of 6

Conditional Format cell based on value of cells in range

  1. #1
    Registered User
    Join Date
    09-20-2011
    Location
    Belfast
    MS-Off Ver
    Excel 2007
    Posts
    34

    Conditional Format cell based on value of cells in range

    Hello,

    In the attached workbook I am trying to format cells in column A if the letter F appears anywhere in the row. I'm not really sure how to describe it but I would want the format on cells A1,A2 and A5 as he letter F appears on those rows.

    Hope that makes sense.

    Dean
    Attached Files Attached Files
    Last edited by Dean81; 03-20-2012 at 12:21 PM. Reason: SOLVED

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Conditional Format cell based on value of cells in range

    you can do this with the following formula, example attached

    =COUNTIF($B1:$H1,"F")>0
    Attached Files Attached Files
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

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

    Re: Conditional Format cell based on value of cells in range

    Select all the cells in column A, starting with A1 (the active cell), then click on Conditional Formatting | New Rule | Use a formula ... etc., and then enter this formula in the box:

    =COUNTIF(1:1,"f")>0

    then set up the format that you want (foreground colour, background colour [fill] etc) and then OK your way out. The cell references will automatically adjust to suit the other rows.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    09-20-2011
    Location
    Belfast
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Conditional Format cell based on value of cells in range

    That's great. Thanks very much. Just out of interest, if I wanted it to be anything between F and H rather than just F or say, anything greater than F, how would I do that?

    Dean

  5. #5
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Conditional Format cell based on value of cells in range

    You could do it like this:

    =COUNTIF($B1:$H1,">=F")=0

    of ir you wanted to do inbetween a range you could use countifs like this

    =COUNTIFS($B1:$H1,">=F",$B1:$H1,"<=G")=0

  6. #6
    Registered User
    Join Date
    09-20-2011
    Location
    Belfast
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Conditional Format cell based on value of cells in range

    Thanks very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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