PC Review


Reply
Thread Tools Rate Thread

Comparing Conditional Formatting in VBA

 
 
Faraz A. Qureshi
Guest
Posts: n/a
 
      10th Jul 2009

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

 
Reply With Quote
 
 
 
 
OssieMac
Guest
Posts: n/a
 
      10th Jul 2009

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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting comparing two cells jef Microsoft Excel Discussion 2 2nd Oct 2009 10:51 PM
Comparing Conditional Formatting in VBA Faraz A. Qureshi Microsoft Excel Programming 3 11th Jul 2009 09:22 PM
Conditional Formatting - Comparing 2 columns LinLin Microsoft Excel Worksheet Functions 1 3rd Apr 2009 02:20 AM
Comparing two lists using Conditional Formatting roniaelm@hotmail.com Microsoft Excel Worksheet Functions 3 4th Jun 2007 01:10 PM
conditional formatting comparing columns SGM Microsoft Excel Worksheet Functions 2 14th Apr 2004 04:32 PM


Features
 

Advertising
 

Newsgroups
 


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