![]() |
Sum Cells Based on Color
Hello,
I need to sum cells on sheet1 from sheet2 that have no fill or white background. In a cell on Sheet1 I used: =SUMPRODUCT(--(ColorIndex('Sheet2'!C:C)=2),'Sheet2'!C:C) But it didn't work. Any help? Thanks, Sherry N. |
Sum Cells Based on Color
see:
http://www.cpearson.com/Excel/colors.htm -- Gary''s Student - gsnu200768 "Sherry N." wrote: Hello, I need to sum cells on sheet1 from sheet2 that have no fill or white background. In a cell on Sheet1 I used: =SUMPRODUCT(--(ColorIndex('Sheet2'!C:C)=2),'Sheet2'!C:C) But it didn't work. Any help? Thanks, Sherry N. |
Sum Cells Based on Color
Thanks but I must be doing something wrong. I copied the code, pasted in VB
editor and called the sumbycolor function but it's not working. Any other solutions? -- Sherry N. "Gary''s Student" wrote: see: http://www.cpearson.com/Excel/colors.htm -- Gary''s Student - gsnu200768 "Sherry N." wrote: Hello, I need to sum cells on sheet1 from sheet2 that have no fill or white background. In a cell on Sheet1 I used: =SUMPRODUCT(--(ColorIndex('Sheet2'!C:C)=2),'Sheet2'!C:C) But it didn't work. Any help? Thanks, Sherry N. |
Sum Cells Based on Color
I think it's not working because I am using conditional formatting to shade
my cells. Could that be it? Or might it be because the data is coming from a query? -- Sherry N. "Sherry N." wrote: Hello, I need to sum cells on sheet1 from sheet2 that have no fill or white background. In a cell on Sheet1 I used: =SUMPRODUCT(--(ColorIndex('Sheet2'!C:C)=2),'Sheet2'!C:C) But it didn't work. Any help? Thanks, Sherry N. |
Sum Cells Based on Color
It's the conditional formatting that's the problem.
If you want to try to return the color based on conditional formatting, you could review the code from Chip Pearson's site: http://cpearson.com/excel/CFColors.htm I think it's far from trivial. You may want to use another cell that mimics the same conditions, but returns a number. It may be lots easier. Sherry N. wrote: I think it's not working because I am using conditional formatting to shade my cells. Could that be it? Or might it be because the data is coming from a query? -- Sherry N. "Sherry N." wrote: Hello, I need to sum cells on sheet1 from sheet2 that have no fill or white background. In a cell on Sheet1 I used: =SUMPRODUCT(--(ColorIndex('Sheet2'!C:C)=2),'Sheet2'!C:C) But it didn't work. Any help? Thanks, Sherry N. -- Dave Peterson |
Sum Cells Based on Color
Na, won't work I am using And and Formula is. Thanks a lot though.
-- Sherry N. "Dave Peterson" wrote: It's the conditional formatting that's the problem. If you want to try to return the color based on conditional formatting, you could review the code from Chip Pearson's site: http://cpearson.com/excel/CFColors.htm I think it's far from trivial. You may want to use another cell that mimics the same conditions, but returns a number. It may be lots easier. Sherry N. wrote: I think it's not working because I am using conditional formatting to shade my cells. Could that be it? Or might it be because the data is coming from a query? -- Sherry N. "Sherry N." wrote: Hello, I need to sum cells on sheet1 from sheet2 that have no fill or white background. In a cell on Sheet1 I used: =SUMPRODUCT(--(ColorIndex('Sheet2'!C:C)=2),'Sheet2'!C:C) But it didn't work. Any help? Thanks, Sherry N. -- Dave Peterson |
All times are GMT +1. The time now is 10:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com