+ Reply to Thread
Results 1 to 4 of 4

Sum Up Highlighted Only Rows

  1. #1
    Registered User
    Join Date
    04-27-2009
    Location
    Bay Area, Ca
    MS-Off Ver
    Excel 2003
    Posts
    2

    Sum Up Highlighted Only Rows

    My boss asked me to look into this ... so no pressure or anything ...

    I need to be able to sort cells based on color conditions.

    Example to explain my needs:
    column1 [fruit]----------column2 [#]
    ---------------------------------------------------------
    Apple ----------------------2 (Highlighted Red Cell)
    Grape ----------------------2 (Highlighted Purple Cell)
    Apple ----------------------1 (Highlighted Red Cell)

    Lets say that I need to sum up the amount of Apples (in column2).
    Since this sheet is continuously being added to, it would be nice to be able to sum up the highlighted rows. How do I do this?

    I hope this makes sense ... Thanks.

  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: Sum Up Highlighted Only Rows

    Doing math by color coding is a horrible technique. Math is hard enough to do on numbers and text comparisons, throwing colors into it is unwise and unnecessary.

    What is turning those cells red/purple? Conditional Formatting? (I hope!) ...or are you manually doing it? Anything CF is doing can be turned into a normal cell formula and used to enter numeric values instead of actual colors. Heck, even the WORD "red" or "Purple" is easier to do math on than the actual color.


    TIP:
    Whatever methodology/mentality that is being used to color a cell can be used IN a cell to enter an index # instead. Red...1 Purple...2 Blue...3

    With numbers in a column, doing math with SUMIF() is easy.
    _________________
    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
    Registered User
    Join Date
    04-27-2009
    Location
    Bay Area, Ca
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Sum Up Highlighted Only Rows

    This was my first reaction as well ...
    I am using CF to originally highlight the cells.
    I am thinking I can associate a number value with the cell color based on conditioning and hide that row.

    Problem solved. Thanks for helping me out!


  4. #4
    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 Up Highlighted Only Rows

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

+ 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