PDA

View Full Version : Solved: Count a different cells depending on what colout the font is???



anthony20069
12-10-2008, 03:53 AM
Hi guys,

Need your expert help again :),

Now I dont know if this is possible.....

Bassically (as what the title says) - is it possible to add a cell depending on what colout the font is

So......

In cell E1 there needs to be a total of Coloumn E:5:E17 (there is text in these cells) but only count them if they are red

Is this possible????

Cheers

Bob Phillips
12-10-2008, 04:20 AM
See http://www.xldynamic.com/source/xld.ColourCounter.html

anthony20069
12-10-2008, 04:37 AM
Ok thanks for poiting me to that site - i tried what they suggested but when i use

=SUMPRODUCT(--(ColorIndex(E5:E45,TRUE)=3))

it brings up this error

#NAME?

any ideas?

*** didnt name the cell range :banghead:

now i have named the cell range to "comp_actions" but am getting this error now

#REF!

????

Bob Phillips
12-10-2008, 04:50 AM
You have to install the macro code on that site as well.

anthony20069
12-11-2008, 06:28 AM
Ok so I have put that macro in the sheet I want this to happen, but it is still giving me the #ref! error... am i doign something wrong (well obv i am :P )

Bob Phillips
12-11-2008, 06:47 AM
Post your workbook so that we can see.

anthony20069
12-11-2008, 07:07 AM
Attached sample worksheet....

thanks for the help btw

Bob Phillips
12-11-2008, 07:17 AM
You need to move the code from the worksheet module into a standard code module, and change the formula to

=SUMPRODUCT(--(ColorIndex(Completed,TRUE)=3))

etc.

anthony20069
12-11-2008, 07:21 AM
awsome.... thanks very much for that, really appreciate it....