+ Reply to Thread
Results 1 to 5 of 5

format named cells based on value of another cell

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    31

    format named cells based on value of another cell

    Hi,

    Here's what Iam trying to do..
    I have 20 named cells/range and I need to change the color of these cells based on the value of another cell.
    eg :- if value in A1 is AAA then change the color of cells named AAA
    if value in A2 is BBB then change the color of cells named BBB
    if value in A3 is XXX then change the color of cells named XXX

    Thanks
    Suji

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: format named cells based on value of another cell

    Select each range in turn and apply conditional formatting using the formulas:

    =$A$1="AAA"

    =$A$2="BBB"

    =$A$3="XXX"

  3. #3
    Registered User
    Join Date
    08-30-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: format named cells based on value of another cell

    the problem with that is A1 can have any value ...ie AAA or BBB or CCC or DDD etc ... similarly A2,A3,A4..... also can have any value AAA, BBB,CCC etc.. but there wont be any duplicates ie AAA will be used only once but can be in any of the cells.

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: format named cells based on value of another cell

    OK, still with conditional format, use the formula;

    =NOT(ISNA(MATCH("AAA",$A$1:$A$4,0)))

    Edited to add: Or,

    =COUNTIF($A$1:$A$4,"XXX")>0

  5. #5
    Registered User
    Join Date
    08-30-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: format named cells based on value of another cell

    Dear Andrew,

    Thanks a lot. it worked.

    One more question ... is it possible to merge cells using conditional formatting. reason being when I select a group of cells and apply conditional formatting, I want to change value in the cell and apply border only around the whole group of cells..
    eg :- when I apply conditional formatting to F1:G4 .. I want F1:G4 merged with border around it and also add some text to it.

    Thanks in advance,

    Suji
    Last edited by sujimon; 01-19-2013 at 08:40 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