How to skip coloured cells using VBA.
Hi,
I am currently using the following VBA in my spreadsheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Interior.Color = RGB(128, 128, 128) Then
' Has Line, Select Next Cell
ActiveCell.Offset(1, 0).Range("A1").Select
End If
End Sub
However the code is not working on the conditionally formatted cells. I assume its because these particular cells have the letter "X" in them. Or it might not work because the cells are conditionally formatted? All i know is that the above VBA works only on cells that i manually color with RGB 128,128,128 and not cells when they are conditionally formatted to RGB 128,128,128 using the format based on a formula. Can someone please help me so that the above VBA works on both manually and conditionally formatted cells.
Many thanks
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago