+ Reply to Thread
Results 1 to 8 of 8

Sum cells based on color in Mac 2008

  1. #1
    Registered User
    Join Date
    10-24-2009
    Location
    Atlanta
    MS-Off Ver
    Excel 2008
    Posts
    4

    Sum cells based on color in Mac 2008

    I am trying to SUM cells in Excel 2008 based on the cell's background color. I know there is a way to create a formula for this if you are using PC versions of Excel, but I can't figure out how to do it for Excel 2008. Do I need to use Applescript? If so, what do I need to do?

    Thanks.
    Last edited by KO3; 10-27-2009 at 08:31 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Mac Excel 2008 help needed

    What logic was used to color the cells? Instead of trying to sum by color, sum by the same logic.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Mac Excel 2008 help needed

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then amend your thread title accordingly.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    10-24-2009
    Location
    Atlanta
    MS-Off Ver
    Excel 2008
    Posts
    4

    Re: Sum cells based on color in Mac 2008

    Thanks for the response (and title change suggestion). I posted this question at Yahoo Answers at the same time I posted it here. Here's the link:

    http://answers.yahoo.com/question/in...4200202AAVFi7p

    JBeaucaire: In your post, you suggested trying to sum by the same logic, but I'm not sure what you meant. What I'm trying to do is sum cells by two different types of logic. I have three columns with sum totals for each column, and what I want to do is also categorize the cells from all three columns by another logic. Does that make sense? I apologize for my lack of clarity and use of proper "lingo"--I'm new to Excel and completely self-taught.

    Thanks.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sum cells based on color in Mac 2008

    What I mean is "Why were the cells colored?" There was SOME logic behind your choice to color the cells. Humans do that...we color things.

    But Excel is perfectly capable of using the same logic you used to color cells to count by. So, explain why you colored them, what the colors mean, and I'm sure something can be suggested for turning THAT logic into a sum formula.

  6. #6
    Registered User
    Join Date
    10-24-2009
    Location
    Atlanta
    MS-Off Ver
    Excel 2008
    Posts
    4

    Re: Sum cells based on color in Mac 2008

    Thank you for using layman's terms... I appreciate it!

    I am trying to create a personal budget spreadsheet. I know there are plenty of free templates online, but I wanted to create something simple that fit my specific needs without all of the extra bells and whistles.

    I want to keep track of all of my purchases. I have them all in a chronological, horizontal list. From left to right, I have the date, the amount of the transaction, and a description. I input the amount of the transaction in one of three columns: "cash," "checking," or "savings." At the top I have a formula to sum how much money was spent in each of those categories.

    I also want to categorize each transaction as "food," "bills," "gas," etc. This is where I thought the colors would come in handy. Food purchases could be red cells, bills could be blue, etc. At the top, I would like to have another formula that can sum the amount from all of the red cells, whether they are from the "cash" or "checking" or "savings" category, so I can see how much was spent on food (and all of the other color categories).

    I learned from reading other forums that previous versions of Excel just need a macro to create a new formula, but for whatever reason I can't do that in Excel 2008. Is there a way to create a new formula that can sum cells based on color? Or is there another, color-less solution?

    Thanks.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sum cells based on color in Mac 2008

    Create a new column in your sheet called CATEGORY. Instead of placing a value in the CASH column and coloring it BLUE for "food", just put the word "Food" in the new column on the same row.

    Also, separate columns for types of spending is non-standard, too. Let another column be the TYPE column. Now each row of data uses the same # of columns and still has all the pertinent info for you to do simple SUMIF() formulas on the data.

    Please Login or Register  to view this content.
    G2:
    =SUMIF(B:B,$F2,$D:$D)

    I2:
    =SUMIF(C:C,$H2,$D:$D)

    Just copy those formulas down for all your CATEGORIES and TYPES.

  8. #8
    Registered User
    Join Date
    10-24-2009
    Location
    Atlanta
    MS-Off Ver
    Excel 2008
    Posts
    4

    Re: Sum cells based on color in Mac 2008

    Wow, that makes so much more sense. I never knew how the SUMIF formula worked. Thank you so much for such a thorough response. This has been my first "forum" experience, and I can't believe how simple it was to get help quickly and easily.

    Thank you again!

+ 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