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 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago