NuttyBuddy
New Member
- Joined
- Nov 2, 2002
- Messages
- 6
Hello! I need a macro which will color a range of cells a color if a certain criteria is met. I can't use conditional formatting because I have more than four cell shading tests to perform. Here is my setup:
In my worksheet, the cells cover a range of grids C5 through Y254 - thats a 23x250 rectangular cell grid. Each cell contains an 8 character text value.
1)If the left most character of the cell contents (text) is "Y", I want the cell background green - which is color 43 in my custom color grid.
2)If the 2 left most characters of the cell contents (text) is "N1", I want the cell background blue - which is color 55 in my custom color grid.
How would I attain 1 and 2 above in a macro?
A macro for the above two examples I supplied should allow me to expand the tests to the other criteria I need.
Thanks for the help!
Buddy
In my worksheet, the cells cover a range of grids C5 through Y254 - thats a 23x250 rectangular cell grid. Each cell contains an 8 character text value.
1)If the left most character of the cell contents (text) is "Y", I want the cell background green - which is color 43 in my custom color grid.
2)If the 2 left most characters of the cell contents (text) is "N1", I want the cell background blue - which is color 55 in my custom color grid.
How would I attain 1 and 2 above in a macro?
A macro for the above two examples I supplied should allow me to expand the tests to the other criteria I need.
Thanks for the help!
Buddy