Okay, the Rolling Stones is one of my favorite groups and "Satisfaction" is one of my favorite songs. But I am really having a difficult time with an excel project and I could really use some help with. Let me explain:
I am going to paste a copy of the code that I have up to this point. What I am trying to do is take the color coding in a cell and give it a value of either "C" or "H" and put that value in an adjacent cell. Here are the cells that will display the color blue or red. And what I want to do is have that cell's color produce an "H" if it is red, or "C" if it is blue, and I want this character to appear in adjacent cells. For example:
Cells with red or blue colors ...............Cells where the "H" or "C" will appear
T9:T31 ................................................... AK9:AK31
U9:U31 .................................................. AL9:AL31
V9:V31 .................................................. AM9:AM31
W9:W31................................................. AN9:AN31
X9:X31................................................... AO9:AO31
Y9:Y31................................................... AP9:AP31
Private Sub Worksheet_Calculate()
' Multiple Conditional Format
Dim rng As Range
' Adjust Format range to suit
Set rng = Range("T9:T31, U9:U31, V9:V31, W9:W31, X9:X31, Y9:Y31")
' Adjust conditions to suit
For Each ce In rng
Select Case ce.Value
' BLUE
Case 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 19, 22, 23, 24, 26, 27, 30, 31, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56
ce.Interior.ColorIndex = 3
' RED
Case 7, 8, 15, 16, 17, 18, 20, 21, 25, 28, 29, 32, 33, 36, 53
ce.Interior.ColorIndex = 5
' No Format
Case Is <> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56
ce.Interior.ColorIndex = 0
End Select
Next ce
End Sub
I am going to paste a copy of the code that I have up to this point. What I am trying to do is take the color coding in a cell and give it a value of either "C" or "H" and put that value in an adjacent cell. Here are the cells that will display the color blue or red. And what I want to do is have that cell's color produce an "H" if it is red, or "C" if it is blue, and I want this character to appear in adjacent cells. For example:
Cells with red or blue colors ...............Cells where the "H" or "C" will appear
T9:T31 ................................................... AK9:AK31
U9:U31 .................................................. AL9:AL31
V9:V31 .................................................. AM9:AM31
W9:W31................................................. AN9:AN31
X9:X31................................................... AO9:AO31
Y9:Y31................................................... AP9:AP31
Private Sub Worksheet_Calculate()
' Multiple Conditional Format
Dim rng As Range
' Adjust Format range to suit
Set rng = Range("T9:T31, U9:U31, V9:V31, W9:W31, X9:X31, Y9:Y31")
' Adjust conditions to suit
For Each ce In rng
Select Case ce.Value
' BLUE
Case 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 19, 22, 23, 24, 26, 27, 30, 31, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56
ce.Interior.ColorIndex = 3
' RED
Case 7, 8, 15, 16, 17, 18, 20, 21, 25, 28, 29, 32, 33, 36, 53
ce.Interior.ColorIndex = 5
' No Format
Case Is <> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56
ce.Interior.ColorIndex = 0
End Select
Next ce
End Sub