+ Reply to Thread
Results 1 to 10 of 10

conditional formatting two cols such that both cols get same color based on a sum

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    conditional formatting two cols such that both cols get same color based on a sum

    See enclosed file.......it may help explain what i am trying to do.

    Basically, i have two cols of values.......say it is Col A and Col B.

    if the sum of the values in ColA + ColB are less than or equal to some limit.......say UL then make BOTH cells in A and B "green".

    Also, if the sum of the values in ColA and ColB are greater than some limit.....say UL then make BOTH cells in A and B "red".


    I can sort of get it to work (see enclosed file)....but if A1=2 and B1=3 and UL is 4 then only A1 turns red and B1 does not change. see enclsoed file.
    Attached Files Attached Files
    Last edited by welchs101; 11-17-2011 at 03:23 PM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditional formatting two cols such that both cols get same color based on a sum

    Hi

    If I understand correctly your goal, take a look at the attachment
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: conditional formatting two cols such that both cols get same color based on a sum

    thanks. based on your inputs i was able to come up with the following. which works for formatting a large column of values.

    in the conditional formatting do the following:

    Please Login or Register  to view this content.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditional formatting two cols such that both cols get same color based on a sum

    Good job!!

    Everything OK, then..

  5. #5
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: conditional formatting two cols such that both cols get same color based on a sum

    well, almost..............

    if i need to create a new thread for this i will.........


    I forgot i wanted to add a "third color" ..........amber


    Consider the following:
    1) if (sum(a,b) is greater less than or equal to the UL) and if(sum(a,b) is greater than or equal to the LL then make color amber.


    LL<=sum(a,b)<=UL



    2) if sum(a,b) is greater than the UL then make red


    sum(a,b)>=UL




    3) if sum(a,b) is less than the LL then make green

    sum(a,b)<LL







    for some reason i am having a tough time getting it to work.

  6. #6
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: conditional formatting two cols such that both cols get same color based on a sum

    here is the file i have now.........still cant get the amber to work.......any thoughts......i think its the equation/formula i input for amber but i am not sure
    Attached Files Attached Files

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditional formatting two cols such that both cols get same color based on a sum

    What is LL??

  8. #8
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: conditional formatting two cols such that both cols get same color based on a sum

    ok i think i got it.......thanks again for your help......never would have gotten on the right path otherwise

    see enclosed
    Attached Files Attached Files

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditional formatting two cols such that both cols get same color based on a sum

    OK! Isaw it!......

    I think we did it!
    Attached Files Attached Files

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditional formatting two cols such that both cols get same color based on a sum

    Glad to helped!!

+ 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