Copy all the code from the "Code Samples" box at bottom of page.
Alt + F11 to open the
VB Editor.
CTRL + r to open the Project Explorer.
Select your workbook/project and right-clickInsertModule.
Paste the code into that module.
Use one of the SUMPRODUCT formulas in a cell to sum the green colored text
cells.
Change the colorindex to 10 for green text.
i.e. =SUMPRODUCT(--(ColorIndex(A1:A100,TRUE)=10),A1:A100)
If you were summing on the background color use
=SUMPRODUCT(--(ColorIndex(A1:A100)=10),A1:A100)
Gord
On Sun, 30 Sep 2007 09:31:03 -0700, pcsski
wrote:
Thanks. I went to that URL. I'm assuming I have to put that sample code into
excel. Where do I put it and do I have to make any changes to it? Just to
explain my situation, I have a column of numbers and at the bottom of the
column I want the formula to only add the green colored numbers.
"Gord Dibben" wrote:
You missed part of the URL
Try this instead.
http://www.xldynamic.com/source/xld.ColourCounter.html
Gord Dibben MS Excel MVP
On Sun, 30 Sep 2007 06:52:01 -0700, The Rain
wrote:
http://xldynamic.com/source/counting
--
Can''t hear the Rain ?
Then listen to it.
"pcsski" wrote:
Can I make a formula to add or not to add based on the color of the text in a
cell?