+ Reply to Thread
Results 1 to 20 of 20

Conditional formatting and specific formula

Hybrid View

  1. #1
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Conditional formatting and specific formula

    Hi,

    How can I do a conditional formatting of cells C5:C9 if
    C5 is not blank or contain some port of specific text.

    Thank you for you help!
    Last edited by NBVC; 02-25-2011 at 10:17 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    Do you mean if
    C5 is not blank and contain some part of specific text.?

    and if so, what does "if
    C5 is not blank or contain some part of specific text." mean?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    Sorry I was not clear at all. These are two different conditions.
    I mean If C5 contains the following part:
    "sla" then format C4:C9 in blue
    and
    If C5 is not blank then format C4:C9 in red.

    How can I do this?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Conditional formatting and specific formula

    Assuming blue takes priority over red (since in both cases, C5 is not blank)

    Select your range, Conditional Formatting> Using Formula
    =ISNUMBER(SEARCH("sla",C$4)) Format blue
    Second condition
    =C$4<>""
    Do they work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Conditional formatting and specific formula

    Chemist,
    I think the OP meant to test C5 not C4 =ISNUMBER(SEARCH("sla",C$5)) and =C$5<>""

  6. #6
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    With the second condition:
    =C$4<>""
    It formats only the cell, which is not blank

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    Which cell(s) is it supposed to format then? You said: If C5 is not blank then format C4:C9 in red. (there is still confusion as to whether we are looking at C5 or C4, but essentially chemist's formula says to format all cells in C4:C9 if C5 is not blank).

    Maybe posting a small sample workbook might help to understand what you really want.

  8. #8
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    =ISNUMBER(SEARCH("Button",$D$6))

    =C$6<>""

    Both applies to
    =$C$6:$F$6

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    Here you are looking at 2 different cells for determining what to colour the range with, C6 and D6.

    If you have the conditions listed in the order you show, then all cells in C6:F6 will be blue if the word "button" appears in D6. Stop.

    If the first condition is not true, then it will look at C6 to see if it is blank. If C6 is not blank, then C6:F6 will all be red.

  10. #10
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    OK.
    How can I change it in order to work as I want -
    If button is met in D6, then - format the row in red.
    But if buttons is not met in D6, and C6 is not blank, then format in blue
    Last edited by bigbonusprize; 02-23-2011 at 12:20 PM.

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    Try to change second format to:

    =AND(C$6<>"",ISERR(SEARCH("Button",$D$6)))

  12. #12
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    Doesn't work
    Do you have any other suggestions?

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    Yeah, upload a sample showing what you need to see.

  14. #14
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula


  15. #15
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    An Excel spreadsheet attachment is preferred. I don't see row/column headers, etc...

  16. #16
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    Attached.
    On the image is the final target formatting.
    Thanks.
    Attached Images Attached Images
    Attached Files Attached Files

  17. #17
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    See attached
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    OK Thank you for the help and support. Seems that the third rule was the problem.

  19. #19
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting and specific formula

    There were other problems.. if you look carefully... your original had $ before the row numbers.. so they were not applicable to each row independently, also, the Applied to range wasn't right... and the formula was referencing one row below the active row...

  20. #20
    Registered User
    Join Date
    02-11-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Conditional formatting and specific formula

    Yes, you are right. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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