+ Reply to Thread
Results 1 to 18 of 18

conditional formatting with totals

  1. #1
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Question conditional formatting with totals

    Good Morning all.

    I am working on the enclosed sheet. I need to be able to in col. Y put a (l) or (w) for win or loss and have it look up the team in the sheet and color the cell as shown in the sheet. then I need to find a way to total the points for lost points and won points for each player.here is the issue, the sheet is brought in from a program that actually puts who picked what and for how many points. So without rebuilding it each week i want to be able to just import it into the sheet. Any help would be great.
    Attached Files Attached Files
    Last edited by komet12; 10-17-2012 at 01:51 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: conditional formatting with totals

    Hi Komet12,

    Please share the logic for conditional formatting.. . when to Red and when to Green..?
    Apart from these you need player wise win / losses.. right? If this is the case, do you have any master list for players or it would be as per data gets available every week. ?


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals

    if in col Y is a l then it will be red and a w it will be green. this is manually entered in col Y as the games are played. as for the players in col a are the players names and they are set in alpha order and this does not change. as u can see in col. u i tried a =RIGHT(B2,3) but having issues getting just the number extracted. I need to have a total points won and a total points lost in cols V and W so in V the header would be points lost ans in Col.W Points Won.. Hope you can follow this lol

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: conditional formatting with totals

    In Column B use these formuale in conditonal formatting

    =y2="w" format green
    =y2='l" format red

    In column U use this to separate numbers
    =MID(B2,FIND("(",B2)+1,FIND(")",B2)-FIND("(",B2)-1)*1

    then use
    =SUMIFS($U$2:$U$22,$Y$2:$Y$22,"l",$A$2:$A$22,A2)
    or
    =SUMIFS($U$2:$U$22,$Y$2:$Y$22,"w",$A$2:$A$22,A2)

    to arrive at loss or win total for each player

    Does this work for you?
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals

    thanks for the help some worked ok.. i am enclosing the sheet.

    what needs to happen is it should look like the image i have included. somehow i need it to look at the team names and fill every instance of that team in the grid red for loss and green for win. Then total lets use player Adam will total how many points he lost by totaling the points in red and also total how many he won points in green. so the sheet will look something like the one at the bottom of the sheet by the end of the day.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals

    I was thinking is there a way to index the teams and then have it match the games and if Col Y is a l then color that cell red and if Y is a w then Color it green?

  7. #7
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals updated

    hello

    I have updated the inclosed sheet and am close to a solution. here is what I am thinking..

    1. I need a conditional format to happen in the "games" table T2:AU22 if you look at the conditional format I tried u will see what I need. ( needs to look at the "TEAMS" BM2:BM33 as well as BN2:BN33 and color cells accordingly using the "l" and "w" as the key.
    2. The points that have a "l" designation need totaled for each person in column BD and the points that have a "w" designation need totaled for each person in column BE.

    I have modified a formula suggested with no results any help would be so helpful.
    I have defined names of "games" and "teams"
    Attached Files Attached Files

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: conditional formatting with totals

    In CF use
    Please Login or Register  to view this content.
    copy down

    In BD2 use
    Please Login or Register  to view this content.
    In BE2 use
    Please Login or Register  to view this content.
    Does this give you desired results?

  9. #9
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: conditional formatting with totals

    In CF use
    Please Login or Register  to view this content.
    copy down

    In BD2 use
    Please Login or Register  to view this content.
    In BE2 use
    Please Login or Register  to view this content.

    Copy down
    Does this give you desired results?

  10. #10
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals Update

    OK I have re-vamped the sheet to show what I am trying to get it to do. This was all done manually and I would like to automate it. I am wanting to control the entire sheet on if a NFL team wins or looses. if you notice in Col. BN is a list of all the teams and has been named "teams" in BO is the input column for wins and losses. I have named the table from A2:AU22 has been named "games". so here is the problem I need totals for points won (green) and points lost (red) for each player A2:A22 .
    scenario: when i put a w in BO beside the team name like Ari it should color the cells with ARI in the game table green and then put the amount in the point won Col. then as games are played user will put in the "w" and "l"'s and as the games are all completed should look like the updated that I have included
    Attached Files Attached Files

  11. #11
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: conditional formatting with totals

    Hi Komet..

    See if the attached helps..refer sheet named 'Ace'

    The CF rules used are
    Please Login or Register  to view this content.
    Here is NBVC's magic that made the totalling of the points possible
    http://www.excelforum.com/excel-form...ed-values.html

    The formulas are
    Please Login or Register  to view this content.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals

    ok, all seems good as far as the scoring, but I put all teams as a loss and I have a few that did not CF take a look
    Attached Files Attached Files

  13. #13
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: conditional formatting with totals

    Aha...the CF does not work only for the 2-letter teams...

    Change your formula in T2 to
    =TRIM(LEFT(B2,3))

    to remove the extra space. This will now give you the correct CF

  14. #14
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals

    Good Morning ACE_XL

    Well all is great with the sheet with on exception... I have imported this weeks games all the scores in just the first game seem to be picking up points from the very last game. as u will notice in the attached sheet. If I do not put the first game scores in all seems to be ok ?? I was wondering if it is the formula that pulls just the numbers out in U2 that is messing with it.
    Attached Files Attached Files

  15. #15
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: conditional formatting with totals

    Hi Komet,

    For Row 6, the LOOKUP seems to recognise "sea" and "SD" too while summing. I am unsure of how we can sum values only in case of exact matches in an array form. I'll ask around though.

  16. #16
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals

    Seems that Stl,SD,Sea are somehow involved in the error? I tried the following: made another hidden sheet the brought the just the value() in the points field, made sure the names were in text form even tried capital L and W. there is a trigger here somewhere because if u mark all wins or all loss the correct totals are there? i did create names for the "teams" and the the "games" but didn't know if incorporating "names" in the formula would make any difference. This is just vary odd that the "s" teams would cause havoc like it is. Very good learning tool however. I have never used "sum product" before and have broke out my formula books to read up on its exact calculation procedure.
    well there is some FYI for ya anyway

  17. #17
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: conditional formatting with totals

    Hi, I think the problem here is that your list in BM:BN is not listed in alphabetically ascending order (I think the SF and Sea were not in order, and possibly others). The list must be in ascending alphabetic order (by Column BM) for LOOKUP to work properly.

    See attached with list sorted properly.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  18. #18
    Registered User
    Join Date
    10-22-2009
    Location
    Roanoke, indiana
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: conditional formatting with totals

    Your Great Thanks Such a little error caused so much HAVOC Thanks

+ 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