+ Reply to Thread
Results 1 to 6 of 6

SUMIF (cell color)

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Warren, MI
    MS-Off Ver
    Excel 2007
    Posts
    2

    SUMIF (cell color)

    Can a colr be used as a condition of SUMIF?

    I have a column that needs 2B sum'd, but only the one that are (YELLOW).

    I've not been able to find anything in the HELP section of EXCEL that deals with color.

  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: SUMIF (cell color)

    Not using formulae. You need VBA for this. See here how.

    http://www.excelexchange.com/SumByColor.html
    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 Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: SUMIF (cell color)

    I don't know about using SUMIF with cell colors, but is there actual logic involved in which cells that get colored? If so, then there is almost certainly a way to do what you want to do - Excel and logic are like peanut butter and jelly.

    - Moo

  4. #4
    Registered User
    Join Date
    01-25-2013
    Location
    Warren, MI
    MS-Off Ver
    Excel 2007
    Posts
    2

    Wink Re: SUMIF (cell color)

    Fotis,

    Thanks a bunch. First time I used VBA. Took me a bit to figure out that it was connected in a MODULE rather than part of the worksheet... but got it none the less.

    You said you had a function VOLATILE. Are you willing to share that as well?

    Thanks again

  5. #5
    Registered User
    Join Date
    01-09-2014
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: SUMIF (cell color)

    I am not sure what I am doing wrong, but I pasted the above data into a VBF code sheet (not sure if that is what it is called because I am unfamiliar with VBF). I saved the file. When I went back to Excel and tried the formula you had on the sheet, I got an error message of #NAME?. When I click on evauate formula it shows that the part of the formula that contains =sumbycolor is an invallid name. Any suggestions as to what I need to change? Is it something in the way I am saving

  6. #6
    Registered User
    Join Date
    01-09-2014
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    8

    Smile Re: SUMIF (cell color)

    I finally was able to get it to work. I had to save my spreadsheet as an .xlsm file.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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