Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for cell colors?
Hello all,
I don't know if this can be done or how it would be done, so I am asking the experts. Here is my questions. I have a row with targets and 4 rows of with test results. If the test is out of tolorance the cell will be yellow. If the test is out by alot (6%) then the cell turns red. If it is a good test the cell is white. I figured this out in conditional formatting. Here is my main question..... Is there a way to have a macro determine what color the cell is and tell me what status we are at. For instance, if the cell is white "continue", if the cell is yellow "continue", if cell is red "Stop". example: A B C D Targets~~ 5 6 7 8 1 5 5 7 4~~this would be red we must "stop". Columns A,B,C are white 2 5 5 7 5~~ this would be yellow "continue" with testing. ABC are white 3 5 5 7 5~~ this would be yellow stop because you have 2 yellows in a row 4 5 6 7 8~~ everything is white so we can continue with testing Eric |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for cell colors?
On Apr 10, 8:23*am, Eric wrote:
Hello all, I don't know if this can be done or how it would be done, so I am asking the experts. *Here is my questions. I have a row with targets and 4 rows of with test results. *If the test is out of tolorance the cell will be yellow. *If the test is out by alot (6%) then the cell turns red. *If it is a good test the cell is white. *I figured this out in conditional formatting. *Here is my main question..... Is there a way to have a macro determine what color the cell is and tell me what status we are at. *For instance, if the cell is white "continue", if the cell is yellow "continue", if cell is red "Stop". example: * * * * * * * * * * * *A * * * * * B * * * * * * C * * * * * * D Targets~~ * * 5 * * * * * 6 * * * * * * *7 * * * * * * 8 1 * * * * * * * * * * 5 * * * * * 5 * * * * * * *7 * * * * * * 4~~this would be red we must "stop". *Columns A,B,C are white 2 * * * * * * * * * * 5 * * * * * 5 * * * * * * *7 * * * * * * 5~~ this would be yellow "continue" with testing. *ABC are white 3 * * * * * * * * * * 5 * * * * * 5 * * * * * * *7 * * * * * * 5~~ this would be yellow stop because you have 2 yellows in a row 4 * * * * * * * * * *5 * * * * * 6 * * * * * * *7 * * * * * * 8~~ * everything is white so we can continue with testing Eric I've done the same ... but without conditional formatting, just with highlighting via code. If you do it that way, you have a much easier time adding "status" etc. Cheers, HTH Chris |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for cell colors?
Chip Pearson has some code that might lead you in the right direction...
http://www.cpearson.com/excel/colors.aspx Mark Ivey "Eric" wrote in message ... Hello all, I don't know if this can be done or how it would be done, so I am asking the experts. Here is my questions. I have a row with targets and 4 rows of with test results. If the test is out of tolorance the cell will be yellow. If the test is out by alot (6%) then the cell turns red. If it is a good test the cell is white. I figured this out in conditional formatting. Here is my main question..... Is there a way to have a macro determine what color the cell is and tell me what status we are at. For instance, if the cell is white "continue", if the cell is yellow "continue", if cell is red "Stop". example: A B C D Targets~~ 5 6 7 8 1 5 5 7 4~~this would be red we must "stop". Columns A,B,C are white 2 5 5 7 5~~ this would be yellow "continue" with testing. ABC are white 3 5 5 7 5~~ this would be yellow stop because you have 2 yellows in a row 4 5 6 7 8~~ everything is white so we can continue with testing Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What do I need to add to my macro to make the cell colors change | Excel Discussion (Misc queries) | |||
Don't print cell colors, Print font colors. | Excel Discussion (Misc queries) | |||
Can't format font colors or cell fill-in colors | Excel Discussion (Misc queries) | |||
Colors overridden in a Macro | Excel Programming | |||
macro used to change colors | Excel Worksheet Functions |