+ Reply to Thread
Results 1 to 6 of 6

How to use conditional formatting based on diff cell value

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    How to use conditional formatting based on diff cell value

    I am having troubles using conditional formatting. My workbook contains particular stores, and their respective associates. I have the associates grouped with their stores so you can expand the store and see individual sales that those associates contribute to the stores.

    I want the conditional formatting to show for stores if <90 cell is red, 90-100 then cell is yellow, if it is 100+ cell is green. However when I expand the stores to see associates I want to conditional formatting to be if <10% cell is red, 10<>20% cell is yellow, 20%> cell is green. The associates expand into the stores. Assuming there are 7 or less stores how can I make this work, what if there are more than 7 stores.


    this is what I have

    Collapsed

    D1, StoreName J1, Target K1, Actual Sales L1 Achievement Rate
    D7, Store1 J7, 6 K7, 6 L7 100%
    D12, Store2 J12, 10 K12,5 L12 50%
    D20, Store3 J12,20 K12,0 L12 0%
    And so on


    Expanded
    D1, StoreName J1, Target K1, Actual Sales L1 Achievement Rate
    D7, Store1 J7, 6 K7, 6 L7 100%
    D8,Associate1 J8, 1 J8, 1 J8 100%
    D9, Associate2 J9, 2 J9,1 J8 50%
    D12, Store2 J12, 10 K12,5 L12 50%
    D20, Store3 J12,20 K12,0 L12 0%

    Assume each store has several associates
    Attached Files Attached Files

  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: How to use conditional formatting based on diff cell value

    You need a different set of conditional formatting rules for stores and associate cells. But you already have that in place (although the red format for associates is not defined).

    This is working.

    What is the question?

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

    Re: How to use conditional formatting based on diff cell value

    Or, define one set of conditional formatting rules that can apply to the whole column.

    Use a formula for each rule and query the value of column B

    =and($B2="Associate",L2>0.2) -- green
    =and($B2="Associate",L2>0.1) -- yellow
    =and($B2="Associate",L2<=0.1) -- red
    =L2>1 -- dark green
    =L2>=0.9 -- yellow
    =L2<0.9 -- red

    Set the CF to stop when a True condition is found.

  4. #4
    Registered User
    Join Date
    09-15-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to use conditional formatting based on diff cell value

    Thanks, it was the AND format that I was looking for, that will work perfectly. thanks I don't know why I didn't think of AND

  5. #5
    Registered User
    Join Date
    09-15-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to use conditional formatting based on diff cell value

    Actually when I put it the way you have nothing happens, nothing gets coloured? I need to do it similar to how you have it, as I need the conditional format to work for the entire column for when filtering or sorting. If B="Associate" then L gets coloured using light colours based on values. IF B does not ="associate" then L get coloured using dark colours based on values

  6. #6
    Registered User
    Join Date
    09-15-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to use conditional formatting based on diff cell value

    I figured this out thanks to your help

    =AND(NOT($B1="Associate"), $L1<90%)
    =AND($B1="Associate", $L1<=10%)

    Now the entire column works the way I wanted it to, not sure if this was the best way but it works for me

+ 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