+ Reply to Thread
Results 1 to 7 of 7

[SOLVED]Sum cells based on color

  1. #1
    Registered User
    Join Date
    11-02-2012
    Location
    WA
    MS-Off Ver
    Excel 2010
    Posts
    21

    [SOLVED]Sum cells based on color

    Currently column AO tracks all payments due to venders.
    The cells turn brown if those payments are due within 10 days.

    See attached .jpg

    What would be the appropriate formula so that:

    AO74=sum all of the brownish colored cells
    It would ignore all other cells.

    excel question.jpg

    Anyone have any ideas?
    Last edited by blackshag; 11-19-2012 at 05:51 PM. Reason: Clarification

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,609

    Re: Sum cells based on color

    Attach a sample workbook.

    When you are in Advanced reply, click on the paperclip to open the upload window.

    View Pic
    Also, indicate what conditions color the cells. (Excel vba can't get color indexes and codes from jpg's)
    Ben Van Johnson

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Sum cells based on color

    if you have a condition that turns the cells brown, you could also use that same conidtion in a sumif() or sumifS() function
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    11-02-2012
    Location
    WA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Sum cells based on color

    You will find the sample workbook attached.

    Thanks!
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Sum cells based on color

    try this...
    =SUMIFS(AO50:AO70,AN50:AN70,"<="&TODAY(),AN50:AN70,">="&TODAY()-20)

  6. #6
    Registered User
    Join Date
    11-02-2012
    Location
    WA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Sum cells based on color

    Hello FDibbins,
    Thank you for your help. I modified the formula to include all of the applicable cells to the formula below:

    =SUMIFS(AO7:AO75,AN7:AN75,"<="&TODAY(),AN7:AN75,">="&TODAY()-20)

    Unfortunately, this does not compute the sum of the brown cells correctly. Not sure exactly why.

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Sum cells based on color

    Hi blackshag

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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