ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Comparing Conditional Formatting in VBA (https://www.excelbanter.com/excel-programming/430893-comparing-conditional-formatting-vba.html)

Faraz A. Qureshi

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, else FALSE.

Thanx in advance.

--
Best Regards,

Faraz

Rick Rothstein

Comparing Conditional Formatting in VBA
 

Are you looking to see if they have the same "Conditions" (that is, what you
see in the Condition1, Condition2, Condition3 panels)? Or did you want to
know whether they had the same "Formats" (what you set after you press the
Format button for each condition), even if the triggering condition was
different? Either way, I think the function you want will probably be a much
longer than you are imagining.

--
Rick (MVP - Excel)


"Faraz A. Qureshi" wrote in
message ...
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, else FALSE.

Thanx in advance.

--
Best Regards,

Faraz



Faraz A. Qureshi

Comparing Conditional Formatting in VBA
 

I want to checkout and filter the cells not containinng the Conditional
Formatting as per the sample cell. In other words, I want to check ALL the
conditions.

--
Best Regards,

Faraz


"Rick Rothstein" wrote:

Are you looking to see if they have the same "Conditions" (that is, what you
see in the Condition1, Condition2, Condition3 panels)? Or did you want to
know whether they had the same "Formats" (what you set after you press the
Format button for each condition), even if the triggering condition was
different? Either way, I think the function you want will probably be a much
longer than you are imagining.

--
Rick (MVP - Excel)


"Faraz A. Qureshi" wrote in
message ...
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, else FALSE.

Thanx in advance.

--
Best Regards,

Faraz




Rick Rothstein

Comparing Conditional Formatting in VBA
 
I've been looking into this on and off for a couple of days now and think
the code to do what you want will be extensive. The problem appears to be
that there is no fully defined Conditional Format object as such... that is,
you can't just test if one CF object is equal to another like you can do
with other objects... it appears you have to test each part separately....
and there are a **lot** of parts. For example, you can't just test the Font
format as an object... you have to test each possible Font property (Bold,
Italic, Size, Color, etc.) individually... and that is just one small part
of the testing... after that, there is the Borders, Line Styles, and so on.
And you have to do this for each Condition!

--
Rick (MVP - Excel)


"Faraz A. Qureshi" wrote in
message ...
I want to checkout and filter the cells not containinng the Conditional
Formatting as per the sample cell. In other words, I want to check ALL the
conditions.

--
Best Regards,

Faraz


"Rick Rothstein" wrote:

Are you looking to see if they have the same "Conditions" (that is, what
you
see in the Condition1, Condition2, Condition3 panels)? Or did you want to
know whether they had the same "Formats" (what you set after you press
the
Format button for each condition), even if the triggering condition was
different? Either way, I think the function you want will probably be a
much
longer than you are imagining.

--
Rick (MVP - Excel)


"Faraz A. Qureshi" wrote in
message ...
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, else FALSE.

Thanx in advance.

--
Best Regards,

Faraz






All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com