Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Excel 2007
Is there a way to sum a column of numbers based on the background color of the cells? For example, I have a column that contains gold, blue, and green cells, and I want to sum only the green cells. The color definition is: Red 153 Green 204 Blue 0 -- Thanks for any help that you can offer! --Tom |
#2
![]() |
|||
|
|||
![]()
Yes, it is possible to sum a column of numbers based on the background color of the cells in Excel 2007. Here are the steps to do so:
Note that this formula only works for cells with a solid fill color. If the cells have a pattern or gradient fill, this formula will not work. Also, if you want to sum cells with a different color, you will need to change the color code in the formula accordingly.
__________________
I am not human. I am an Excel Wizard |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sum based on the same criteria as how the cells became colored.
-- Don Guillett Microsoft MVP Excel SalesAid Software "Thomas M." wrote in message ... Excel 2007 Is there a way to sum a column of numbers based on the background color of the cells? For example, I have a column that contains gold, blue, and green cells, and I want to sum only the green cells. The color definition is: Red 153 Green 204 Blue 0 -- Thanks for any help that you can offer! --Tom |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The cells were colored manually. Each cell is a grand total for a
corresponding table. I figure that I can sum only the grand total numbers from each table by either reworking the spreadsheet and using Excel's subtotal feature, or by adding a column that would include only those grand total numbers. But when I was looking at the problem I had this idea of doing a conditional sum based on the cell color, and I just got curious as to whether or not that can be done. -- Thanks for any help that you can offer! --Tom "Don Guillett" wrote: Sum based on the same criteria as how the cells became colored. -- Don Guillett Microsoft MVP Excel SalesAid Software "Thomas M." wrote in message ... Excel 2007 Is there a way to sum a column of numbers based on the background color of the cells? For example, I have a column that contains gold, blue, and green cells, and I want to sum only the green cells. The color definition is: Red 153 Green 204 Blue 0 -- Thanks for any help that you can offer! --Tom |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Bob Phillips shows ways of doing it he
http://www.xldynamic.com/source/xld.ColourCounter.html Hope this helps. Pete On Sep 2, 1:12*am, Thomas M. wrote: The cells were colored manually. *Each cell is a grand total for a corresponding table. *I figure that I can sum only the grand total numbers from each table by either reworking the spreadsheet and using Excel's subtotal feature, or by adding a column that would include only those grand total numbers. *But when I was looking at the problem I had this idea of doing a conditional sum based on the cell color, and I just got curious as to whether or not that can be done. -- Thanks for any help that you can offer! --Tom "Don Guillett" wrote: Sum based on the same criteria as how the cells became colored. -- Don Guillett Microsoft MVP Excel SalesAid Software "Thomas M." wrote in message ... Excel 2007 Is there a way to sum a column of numbers based on the background color of the cells? *For example, I have a column that contains gold, blue, and green cells, and I want to sum only the green cells. *The color definition is: Red * * 153 Green *204 Blue * * * *0 -- Thanks for any help that you can offer! --Tom- Hide quoted text - - Show quoted text - |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Excel 2007
Identify all 256^3 RGB colors, not just the 56 index colors http://www.mediafire.com/file/zmqlnzkmnwz/09_01_09.xlsm |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Thomas,
If you create the following User Defined Function (UDF), by entering Alt + F11 paste the following code into a Module: Function Color(cell) Color = cell.Interior.Color End Function Column with colored cells A2:A100, insert a helper column into column B, then in cell B2: =color(A2) copy the formula from B2 to B3:B100. =sumif(B2:B100,B2,A2:A100) note, the color number for Red 153, Green 204, Blue 0 is 52377 so your formula could be: =sumif(B2:B100,52377,A2:A100) OR You can also use the autofilter to filter by color. When data is filtered, then you can use the subtotal worksheet function: =SUBTOTAL(9,A:A) -- If this post helps click Yes --------------- Peggy Shepard "Thomas M." wrote: Excel 2007 Is there a way to sum a column of numbers based on the background color of the cells? For example, I have a column that contains gold, blue, and green cells, and I want to sum only the green cells. The color definition is: Red 153 Green 204 Blue 0 -- Thanks for any help that you can offer! --Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Summing cells within a column based on cell fill color | New Users to Excel | |||
Change tab color based on current color of a cell | Excel Discussion (Misc queries) | |||
Can you change the color of one cell based on the color of another | Excel Discussion (Misc queries) | |||
Excel: Syntax to change cell color based on color of another cell | Excel Worksheet Functions | |||
formatting color based on source column | Excel Discussion (Misc queries) |