Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Conditional Formatting in VBA
How, can I compare the conditional format of one cell with other. For instance, I want to create a UDF like =SameCF(Cell1, Cell2) so as to return a TRUE if both the cells have same conditional formatting schemes applied, in complete, else FALSE. Thanx in advance. -- Best Regards, Faraz |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Conditional Formatting in VBA
Hi Faraz, Can't say I really understand what you are trying to achieve (or why for that matter) but the following examples might help to point you in the right direction. Lookup FormatCondition Object in Help for more info. Example 1 Sub ConditionalFormat() With Sheets("Sheet1").Range("A1") MsgBox .FormatConditions(1).Formula1 MsgBox .FormatConditions(1).Interior.Color End With End Sub Example 2 Sub FormatConditLoop() Dim objCondit As Object 'Loops through the conditions (that is condition 1,2 3 etc) For Each objCondit In Sheets("Sheet1") _ .Range("A1").FormatConditions MsgBox objCondit.Formula1 MsgBox objCondit.Interior.Color Next End Sub -- Regards, OssieMac |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional formatting comparing two columns | Excel Worksheet Functions | |||
Comparing Conditional Formatting in VBA | Excel Programming | |||
Conditional formatting comparing times | Excel Worksheet Functions | |||
Conditional Formatting-Comparing Two Columns | Excel Discussion (Misc queries) | |||
Conditional Formatting-Comparing Two Columns | Excel Discussion (Misc queries) |