Color Formatting

tassmazahir

New Member
Joined
Sep 23, 2002
Messages
3
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.
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

eliW

Well-known Member
Joined
Mar 2, 2002
Messages
1,931
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>
 

tassmazahir

New Member
Joined
Sep 23, 2002
Messages
3
hi
thanks for the reply yeah i am aware that it is to be done through the macro code ..
is it possible to provide me with the same..
and further i dont want to sum the color
i check if a cell is red then it should do the following something like that

thanks
 

eliW

Well-known Member
Joined
Mar 2, 2002
Messages
1,931
Hi,
I am not good with macros

But try to define exactly what you want, like for example: I need a macro to check a range of cells to identify if cell is red colord, and if yes so and so....

I'm sure that one of the "macro guys" will be able to help you.

Eli
 

Watch MrExcel Video

Forum statistics

Threads
1,122,233
Messages
5,594,964
Members
413,955
Latest member
FalcoDaz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top