+ Reply to Thread
Results 1 to 5 of 5

How to exclude colored cells in addition equations

  1. #1
    Registered User
    Join Date
    08-06-2014
    Location
    nc
    MS-Off Ver
    2010
    Posts
    2

    How to exclude colored cells in addition equations

    Hey guys, I was wondering if there was a way to exclude colored cells from addition in a column. I did some searching which suggested VBA but couldn't find anything which made sense to me. I will attach a simple example document to help with understanding what I am trying to accomplish.

    I am building a spreadsheet to keep track of my monthly spending, and debt balance. I keep track of the total amount of bills I pay each month. As I pay them, their respective line is highlighted green in the spreadsheet. I would like to create a macro/formula which would sum the remaining cells in the column which are not highlighted to display the remaining monies which need to be paid out. Hopefully this makes sense and I will keep a close eye on the thread to answer any questions. I'm not sure if this matters but I am using office 2010.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: How to exclude colored cells in addition equations

    You cannot sum by colour without using code. However, if you know the criteria based on which the cells were coloured, you may use the SUMPRODUCT() function [which will take the criteria as input].

    http://www.exceltrick.com/how_to/sum...kground-color/
    http://www.cpearson.com/excel/colors.aspx
    http://www.ozgrid.com/VBA/sum-count-cells-by-color.htm
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to exclude colored cells in addition equations

    This is your macro

    right click on the sheet name at the bottom of excel and click on view code to edit it.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-06-2014
    Location
    nc
    MS-Off Ver
    2010
    Posts
    2

    Re: How to exclude colored cells in addition equations

    Thank you for your responses! While I was not able to get it to work based on the color of a cell I used SUMIF to accomplish my goal with a date in the function criteria. I'll attach the finished table, maybe someone here will find it handy to keep track of how much their monthly expenses are, how much has been paid, and how much is remaining. Each month in the year I copy the sheet so I have a historical log. Also, I need to keep track of how much taxes I am paying compared to the prior year so there are a couple tables which calculate the percentages. Of course the numbers in the table are fictional and there to help understand what the table does.

    Thanks
    Attached Files Attached Files
    Last edited by wheresthericego; 08-07-2014 at 08:04 PM.

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: How to exclude colored cells in addition equations

    Great, so can you mark this solved?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Exclude Specific Colored Rows in a SUMIF Function
    By tshives26 in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 07-18-2014, 11:27 AM
  2. Exclude Specific Colored Rows in a SUMIF Function
    By tshives26 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-16-2014, 02:01 PM
  3. Replies: 1
    Last Post: 11-09-2013, 02:43 AM
  4. Sumif (?) to exclude colored text
    By slinkymaster in forum Excel General
    Replies: 1
    Last Post: 01-19-2012, 08:54 AM
  5. Have blocks of blue colored cells ... want them surrounded by lavender-colored cells
    By rocket1406 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-01-2007, 03:59 PM

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