Results 1 to 8 of 8

Summing by colour and category

Threaded View

  1. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Summing by colour and category

    heres UDF i came up with...its pretty specific to your example though


    Function SumColor(MyRange As Range, Color As Long, Cat As String)
        Dim cell As Range
        
        For Each cell In MyRange
            If Cells(cell.Row, 1).Value = Cat Then
                If cell.Interior.ColorIndex = Color Then
                    SumColor = SumColor + cell.Value
                End If
            End If
        Next
        
    End Function
    included the getbackground color UDF so you know where i get the random numbers from (which is colorindex)
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Summing each category per month
    By stevewilde in forum Excel General
    Replies: 5
    Last Post: 04-25-2014, 10:01 PM
  2. [SOLVED] Summing Data by Week Ending and Category
    By cpalmer72 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-12-2013, 11:13 PM
  3. Summing Data by Week Ending and Category
    By cpalmer72 in forum Excel General
    Replies: 1
    Last Post: 10-03-2013, 02:30 PM
  4. Bar Chart - how to colour specific category axis values.
    By Richard Buttrey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-27-2010, 08:58 AM
  5. Replies: 0
    Last Post: 08-28-2005, 11:07 AM
  6. Summing Data based on Its Category
    By sip8316 in forum Excel General
    Replies: 2
    Last Post: 05-24-2005, 03:06 PM
  7. [SOLVED] summing an array by product category
    By BLW in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2005, 07:06 PM
  8. Colour code category axis labels
    By MattShoreson in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-02-2005, 11:32 AM

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