+ Reply to Thread
Results 1 to 2 of 2

Formulas and Colors

  1. #1
    Registered User
    Join Date
    12-23-2008
    Location
    Aldie, Virginia
    Posts
    4

    Formulas and Colors

    I want to write a formula that checks a cell for a specific string. If the string is in the cell then it needs to apply a background color to a range of cells.

    I have written formulas in the past that included [color], e.g., [Red] or [Blue] in it and it will apply that background color. If someone could please provide me the syntax for applying colors in a formula, I would greately appreciate it.

    Thanks,

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Formulas and Colors

    Hi, you can use conditional formulas for this.

    For example, A1 contains the text "Mary had a little lamb"
    You want B1 to D1 to turn green if A1 contains the text "had"
    Select B1 to D1 and on the Format menu select "Conditional Formatting"
    Select "Formula Is" and in the condition box enter this formula:

    =FIND("had",$A$1)>0

    Format the colouring that you want to apply for this condition.

    Done.

    HTH

+ 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