+ Reply to Thread
Results 1 to 3 of 3

Using conditional formatting to change cell color if the name in the cells matches a range

  1. #1
    Registered User
    Join Date
    04-27-2007
    Location
    Oldsmar, FL
    MS-Off Ver
    2010
    Posts
    43

    Using conditional formatting to change cell color if the name in the cells matches a range

    I'd like to match the name in one group of cells to a list of names and if the name is matched, have the color of the cell change to a specific color. Can that be done in conditional formatting? The attached spreadsheet is a sample of what I'm trying to do.

    format example.jpg

    Thanks for the help
    Attached Files Attached Files

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

    Re: Using conditional formatting to change cell color if the name in the cells matches a r

    Select F12:N23, then click on Conditional Formatting | New Rule and choose Use a Formula …
    Enter this formula in the box:
    =ISNUMBER(MATCH(F12,$B$13:$B$21,0))
    Then click on the Format button | Fill tab and choose your colour for that range of names (green)

    Then repeat, but change the range in the MATCH function (in red above) and choose the colour for that range, and so on. Once you OK your way out of the CF dialogue box, Excel will adjust the cell references automatically.

    I've done this for two colours in the attached file.

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Using conditional formatting to change cell color if the name in the cells matches a r

    fablhof, I think you're going to need to get busy with CF rules....

    Select a cell (eg F14), go to the ribbon, click on Conditional Formatting, click on Highlight Cells Rules, click on "more rules...", click on "Format only cells that contain", select Format only cells with cell value equal to, click into the third field to make it active, then click on (in this case) cell B32. Click on format, fill, select your colour, the "Ok" your way out.

    Click on F14 again, click on the Format Painter brush, then paste the format over all the names (in case there may be duplicates - if you're sure there aren't, or won't be, you needn't bother with the last step.)

    I've done a few to get you started - hope this helps.


    EDIT: or just do it Pete's way! That's why he's an expert
    Attached Files Attached Files
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

+ 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