Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting comparing two columns Shelina Excel Worksheet Functions 6 November 5th 09 06:56 PM
Comparing Conditional Formatting in VBA Faraz A. Qureshi Excel Programming 3 July 11th 09 09:22 PM
Conditional formatting comparing times Mike Excel Worksheet Functions 14 February 17th 09 06:06 PM
Conditional Formatting-Comparing Two Columns Tom K Excel Discussion (Misc queries) 3 May 8th 06 01:03 PM
Conditional Formatting-Comparing Two Columns Tom K Excel Discussion (Misc queries) 1 May 4th 06 06:16 PM


All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"