+ Reply to Thread
Results 1 to 6 of 6

Formula for summing a range of cells based on cell color?

  1. #1
    Registered User
    Join Date
    10-28-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    78

    Formula for summing a range of cells based on cell color?

    I am looking for a formula that will sum a range of cells based on a certain color. I have conditional formated certain rows, and i would like a formula that sums the rows in the sheet looking for that color.

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

    Re: Formula for summing a range of cells based on cell color?

    What is the conditional formula you used?
    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.

  3. #3
    Registered User
    Join Date
    10-28-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Formula for summing a range of cells based on cell color?

    Quote Originally Posted by NBVC View Post
    What is the conditional formula you used?
    I don't have access to it right now, but it was to color the cell based on the date. The cells from today and previous were colored to show "actual" numbers. Cells from today forward were colored differently to distinguish forecasted numbers.

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

    Re: Formula for summing a range of cells based on cell color?

    Well, guessing...

    Try something like:

    =SUMIF(A2:A100,"<="&TODAY,B2:B100)

    and

    =SUMIF(A2:A100,">"&TODAY,B2:B100)

    these will sum values in B2:B100 based on the date in A2:A100 as it compares to Today's date.

    If you just want to count cells, use COUNTIF instead, and don't include a third B2:B100 range.

  5. #5
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Formula for summing a range of cells based on cell color?

    Did this work for you?

  6. #6
    Registered User
    Join Date
    10-28-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Formula for summing a range of cells based on cell color?

    I ended up doing it a different way. I had a summary column at the end of my sheet, so I used a sumproduct formula to sum every 4th row in that column. Seems to have worked. 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