+ Reply to Thread
Results 1 to 8 of 8

multiple conditional format conditions changed based on another cells value?

  1. #1
    Registered User
    Join Date
    01-14-2009
    Location
    southern california
    MS-Off Ver
    Excel 2007
    Posts
    23

    multiple conditional format conditions changed based on another cells value?

    A1:A6 have numeric values 1 to 6.

    I want the conditional format values to change Based on the value in Cell B2.

    If the value in B2 is "old", then I want these conditional format conditions for A1:A6. Numbers between 1-2=green text, 3-4=orange text and 5-6=red text.

    IF the value in B2 is "new" then I want the conditional format conditions in A1:A6 to change so 1=black text, 2-3=green text, 4-5=orange text and 6=red text.

    I know how to do multiple conditional formats but i have no clue how to change multiple conditions based on another cells value.

    I hope this is simple and easy to understand. Thanks in advance.
    Last edited by atreyu55; 06-12-2009 at 03:46 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: multiple conditional format conditions changed based on another cells value?

    You will need 7 rules if you do via Conditional Formatting as the colour can't be varied on one rule based on a variable... given you're running XL2007 this isn't a problem but note on earlier versions a max of 3 conditional formats can be applied (in addition to default) so this would not be backwards compatible.

    ie

    Higlight A1:A6

    To implement choose "Use a Formula" in the Conditional Formatting dialog:

    =AND($B$2="old",OR($A1=1,$A1=2))
    format Green text

    =AND($B$2="new",A1=1)
    format black text

    etc...

  3. #3
    Registered User
    Join Date
    01-14-2009
    Location
    southern california
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: multiple conditional format conditions changed based on another cells value?

    Don,

    That worked like a charm! thank you!

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: multiple conditional format conditions changed based on another cells value?

    I'm glad it worked though no need to quote my reply in your post - I've taken the liberty of removing it.

    Do post back if you have any further problems.

  5. #5
    Registered User
    Join Date
    01-14-2009
    Location
    southern california
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: multiple conditional format conditions changed based on another cells value?

    I have a followup question. if in the cells A1:A6 i have fractions (ie: 1.1 or 3.9) how would I input that value in the OR statement?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: multiple conditional format conditions changed based on another cells value?

    It would depend on what significance they have... if you want to apply a rule for all values between 1 and 2 then

    =AND($B$2="old",$A1>=1,$A1<=2)

    it will all depend on what the rules are - not clear I'm afraid.

  7. #7
    Registered User
    Join Date
    01-14-2009
    Location
    southern california
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: multiple conditional format conditions changed based on another cells value?

    sorry if i didnt make the significance clear, but either way your solution works for exactly what I need.

    Thanks a million!!!

+ 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