+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : conditioning formatting a cell if another cell contain...

  1. #1
    Registered User
    Join Date
    05-23-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 2010
    Posts
    19

    conditioning formatting a cell if another cell contain...

    Hi All,

    If I have two columns A and B; column A contain text with "Bottle 123" and column B contain "B123". How can I use conditioning formatting on Column B, if column A contain the text "Bottle", highlight cell in column B green.


    Kind regards,
    Alex

  2. #2
    Forum Contributor SCLai's Avatar
    Join Date
    08-18-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: conditioning formatting a cell if another cell contain...

    Welcome to the forums

    Please try this:
    Given "Bottle 123" is in A1
    1.) Select Cell B1
    2.) Under conditional formatting, select "Formula is"
    3.) =SEARCH("*Bottle*",$A$1,1)
    4.) Select desired formatting

    If you wish to apply this to the whole of column B:
    5a.) Select the whole of column B instead of only B1, then carry out step 2 ~ 4
    OR
    5b.) After carrying out step 1 ~ 4, copy Cell B1, then select Column B > Right Click > Paste Special > Formats

    Hope this is what you are looking for!

    SC
    Do give a * (bottom left) if the post helped!

  3. #3
    Registered User
    Join Date
    05-23-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 2010
    Posts
    19

    Re: conditioning formatting a cell if another cell contain...

    Thanks SCLai. You are getting to nearly what I want :-)

    A B
    Bottle 123 B123
    Bottle 345 B345
    Bottle 123 C123
    Bottle 123 KA22

    In the above table, I want conditioning formatting in column B:-

    a.) Cell 2 in Column B turn green if
    i.) Cell 2 in Column A contain the word "Bottle"
    ii.) Cell 2 in Column B start with letter "B"

    b.) Cell 2 in Column B turn red if
    i.) Cell 2 in Column A contain the word "Bottle"
    ii.) Cell 2 in Column B does not start with letter "B"

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditioning formatting a cell if another cell contain...

    Hi

    ..Then, highlight your range and try this.

    1) =AND(LEFT($B1)="B",SEARCH("*Bottle*",$A1,1) >>Green

    2) =AND(LEFT($B1)<>"B",SEARCH("*Bottle*",$A1,1)>>Red.

    Is this, works for you?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    05-23-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 2010
    Posts
    19

    Re: conditioning formatting a cell if another cell contain...

    Thanks Fotis!

    Brilliant!

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditioning formatting a cell if another cell contain...

    You are welcome!

    Pls, mark your Thread, as Solved(See at the top of the page to see how to do this).

+ 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