Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors of Cells With Conditional Formatting
I have a code for selecting the cells with specific interior color be
selected as follows, however, how to add cells colored similarly but due to conditional formatting, whether by the 1st, 2nd or any condition? Sub SlctClrCel(CONTROL As IRibbonControl) Dim CRange As Range Dim A As Range Dim B As Range RETRY: Set A = Application.InputBox("Select A Sample Cell With The Desired Interior Color.", Type:=8) Set B = Application.InputBox("Looking In Which Range?" & vbNewLine & "Remember To Select Only The Necessary Cells", Type:=8) For Each C In B If C.Interior.ColorIndex = A.Interior.ColorIndex Then If CRange Is Nothing Then Set CRange = C Else Set CRange = Union(CRange, C) End If End If Next If Not CRange Is Nothing Then CRange.Select Else MsgBox ("None Found!") End If End Sub -- Thanx in advance, Best Regards, Faraz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting Colors of Cells set by Conditional Formatting | Excel Worksheet Functions | |||
Conditional Formatting Based on Colors in a Horz Range of Cells | Excel Discussion (Misc queries) | |||
Conditional Formatting - Not all colors work? | New Users to Excel | |||
Conditional Formatting - more than 4 cell colors | Excel Worksheet Functions | |||
Conditional Formatting in 6 colors | Excel Discussion (Misc queries) |