Hello folks,
This is my first post so I ask that you be kind :-)
I have a worksheet that I want to highlight the selected cells to a different color and place a letter in column A to indicate that color for those that are color blind.
I am currently using the following code for this, which works well when the user selects a continuous set of cells. However, if they select a set of rows and then select another set of rows that are not continuous, I get less than satisfactory results. Any suggestions?
Private Sub ColorAvailable_Click()
R = ActiveCell.Row 'First Row
X = Selection.Rows.Count + R - 1 'Last Row of selection
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 5296274
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Do Until R > X
Range("A" & R).Select
ActiveCell.FormulaR1C1 = ""
R = R + 1
Loop
End Sub
Bookmarks