On 2002-09-24 09:18, tassmazahir wrote:
I am using conditional formatting to change the color of the a particular cell to red yellow and green when it meets the particular criteria accordingly.
I need to further work on and sum the result of all the color obtained to a particular color. To put it in simple say
a=1 , a=2, a=3
b=1, b=2, b=3
i have done a conditional formatting to above if a=1 then change cell color to red , if a=2 then yellow and finally to green.
same goes for b as well. know the result of a and b are in a two different cell. i want to merge the color result so obtain and result the same in a new cell.
Hi tassmazahir and welcome to the board.
You can't sum colors unless you are using macro.
But you can use the same criteria you used for conditional formatting, in a SUMPRODUCT formula to sum all different colors based on cell content.
Look at the example.
Eli
<CENTER><TABLE ALIGN=CENTER BORDER=1><TR><TD BGCOLOR=#0C266B COLSPAN=7><FONT COLOR=WHITE>
Microsoft Excel - Book1_______________Running: xl97 : OS = Windows (32-bit) 4.10</FONT></TD></TR><TR><TD BGCOLOR=#D4D0C8 COLSPAN=7>(<U>F</U>)ile (<U>E</U>)dit (<U>V</U>)iew (<U>I</U>)nsert (<U>O</U>)ptions (<U>T</U>)ools (<U>D</U>)ata (<U>W</U>)indow (<U>H</U>)elp</TD></TR><TR><TD ALIGN=CENTER COLSPAN=2 BGCOLOR=White>F2</TD><TD ALIGN=CENTER BGCOLOR=#D4D0C8 >
=</TD><TD COLSPAN=4 BGCOLOR=White>=SUMPRODUCT(($A$1:$B$4=E2)*1)</TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER> </TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>
A</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>
B</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>
C</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>
D</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>
E</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>
F</TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>
1</TD><TD BGCOLOR=#FFFF00 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>1</FONT></TD><TD BGCOLOR=#FF6600 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>2</FONT></TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FFCC99 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>
Content</FONT></TD><TD BGCOLOR=#FFCC99 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>
Count</FONT></TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>
2</TD><TD BGCOLOR=#FF6600 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>2</FONT></TD><TD BGCOLOR=#00FF00 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>3</FONT></TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FF99CC ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>
1</FONT></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><A HREF=javascript:alert("=SUMPRODUCT(($A$1:$B$4=E2)*1)")><FONT FACE=Arial COLOR=#000000>2</FONT></A></TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>
3</TD><TD BGCOLOR=#00FF00 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>3</FONT></TD><TD BGCOLOR=#FFFF00 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>1</FONT></TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FF99CC ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>
2</FONT></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><A HREF=javascript:alert("=SUMPRODUCT(($A$1:$B$4=E3)*1)")><FONT FACE=Arial COLOR=#000000>4</FONT></A></TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>
4</TD><TD BGCOLOR=#FF6600 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>2</FONT></TD><TD BGCOLOR=#FF6600 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>2</FONT></TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FFFFFF> </TD><TD BGCOLOR=#FF99CC ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>
3</FONT></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><A HREF=javascript:alert("=SUMPRODUCT(($A$1:$B$4=E4)*1)")><FONT FACE=Arial COLOR=#000000>2</FONT></A></TD></TR><TR><TD COLSPAN=7><U>Sheet1</U></TD></TR></TABLE>
<FONT COLOR=#339966>To see the formula in the cells just click on the cells hyperlink</FONT>
<FONT COLOR=#339966 SIZE=1>The above image was automatically generated by [HtmlMaker V1.23]</FONT>
<FONT COLOR=#339966 SIZE=1>If you want this code, <A HREF=mailto:corosuke@chan.co.jp>click here</A> and Colo will email the file to you.</FONT>
<FONT COLOR=#339966 SIZE=1>This code was graciously allowed to be modified: by <A HREF=mailto:ivanmoala@xtra.co.nz>Ivan F Moala</A> All credit to Colo</FONT>
</CENTER>