+ Reply to Thread
Results 1 to 6 of 6

Condition formatting

  1. #1
    Registered User
    Join Date
    02-17-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    45

    Condition formatting

    Could u help me again...

    I want to create a conditional formatting but this time I have:

    A
    1 John
    2.Rado
    3.Simo

    ...so I want to highlight cells which contain Rado and Simo

    Thanks in advance...

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

    Re: Condition formatting

    Quote Originally Posted by ExcelBG View Post
    ...so I want to highlight cells which contain Rado and Simo
    Do you mean
    so I want to highlight cells which contain Rado OR Simo

    A cell cannot be BOTH Rado AND Simo..

    So try using the OR function instead of AND in your conditional formatting rule.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Condition formatting

    hi ExcelBG. when we use "contain", it usually means the full text can be "A Rado B" & it will highlight it. so i think you probably meant it as "equals to"? select the range you want to apply to (eg A1:A10)
    go to Home -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format -> Format values where this formula is true:
    =OR(A1={"Rado","Simo"})

    if you really meant it as "contains", then:
    =SUM(COUNTIF(A1:A1,{"*Rado*","*Simo*"}))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

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

    Re: Condition formatting

    Quote Originally Posted by benishiryo View Post
    =OR(A1={"Rado","Simo"})

    if you really meant it as "contains", then:
    =SUM(COUNTIF(A1:A1,{"*Rado*","*Simo*"}))
    I don't think you can use constant arrays {"Rado", "Simo"} in conditional formatting formulas.
    You would have to write out the entire or
    =OR(A1="Rado",A1="Simo")

    Or a COUNTIF+COUNTIF instead of SUM(COUNTIF

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Condition formatting

    @Jonmo1:
    ahh you're right. didn't try that out. 2nd one would be:
    =COUNTIF(A1:A1,"*Rado*")+COUNTIF(A1:A1,"*Simo*")

    or:
    =OR(ISNUMBER(SEARCH("Rado",A1)),ISNUMBER(SEARCH("Simo",A1)))

  6. #6
    Registered User
    Join Date
    02-17-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Condition formatting

    Thanks all, One of re answers should be my solution. Have a nice day
    Last edited by ExcelBG; 04-02-2013 at 10:51 AM.

+ 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