+ Reply to Thread
Results 1 to 7 of 7

Can I use color as criteria for sumif?

  1. #1
    Registered User
    Join Date
    08-23-2011
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Can I use color as criteria for sumif?

    I have a worksheet where competitors have up to 8 scores in a row, I have manually highlighted 3 of the scores (by changing the font to red), which I would like automatically totalled down a colomn. Can anyone help please?
    Last edited by E.J.; 08-23-2011 at 06:45 AM.

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Can I use color as criteria for sumif?

    Welcome to the forum.

    No, SUMIF() can't do that by itself - you would have to write a VBA UDF to do this - and even that would not be a very good solution.

    If you tell us the reasoning you used to highlight 3 of the scores (eg. they were the 3 largest scores) then we might be able to come up with something for you? A sample workbook might also help...
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Registered User
    Join Date
    08-23-2011
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Can I use color as criteria for sumif?

    Thanks Colin, The scores aren't always the best 3. They have to be from different venues. Is there a different way that I can highlight them to get my desired outcome? The attached Sheet shows how there must be at least one score from each venue. Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Can I use color as criteria for sumif?

    Okay, so for each shooter, it's

    (1) The highest score from WAGC
    +
    (2) The highest score from CMT
    +
    (3) The larger of the second highest score from either venue


    Is that right?

  5. #5
    Registered User
    Join Date
    08-23-2011
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Can I use color as criteria for sumif?

    Thats right

  6. #6
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Can I use color as criteria for sumif?

    Okay, I've attached a solution for you. I added three more columns to make it easier to follow.

    To get the highest score for each shooter at the WAGC I used:
    Please Login or Register  to view this content.
    To get the highest score for each shooter at the CMT I used:
    Please Login or Register  to view this content.
    To get the larger of the 2nd highest score at either venue I used:
    Please Login or Register  to view this content.
    In the spreadsheet, you'll notice that in the formula bar the forumlas are surrounded by { }. This means that they are array formulas. To achieve this effect, when you type the formula into the formula bar, you have to complete the entry with CTRL+SHIFT+ENTER, not just ENTER, and Excel will automatically put the { } into the formula bar for you. You can't type the { } in yourself.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-23-2011
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Can I use color as criteria for sumif?

    Wow, that looks great. It will take me a while to work out your formulaes. Thankyou very much

+ 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