Does anyone know of a quick & easy method to determine whether two cells have the same conditional formatting?
The question arose from one a colleague asked me.
First I tried F5 special to see if that would help, but no joy.
Then I tried vba. if I directly compare the .FormatConditions property of each cell I seem to get a match if both cells have any conditional format - regardless of whether they are the same values for their settings.
I also considered going through all the sub-properties, but that started to seem very long-winded, especially as not all properties exist for some conditions, e.g. if the condition is ">7", say, the .Formula1 property = 7, but there is no .Formula2 property, wheras if the condition is 1<>9 then there is a .Formual2 property.
I even considered trying the idea of using VarPtr to get references to the memory allocated to each .FormatConditions object and using an API function to directly compare the memory allocated to each object, but I could not find a suitable API function - besides, I'm not sure it would work.
Any thoughts?
Tony
The question arose from one a colleague asked me.
First I tried F5 special to see if that would help, but no joy.
Then I tried vba. if I directly compare the .FormatConditions property of each cell I seem to get a match if both cells have any conditional format - regardless of whether they are the same values for their settings.
I also considered going through all the sub-properties, but that started to seem very long-winded, especially as not all properties exist for some conditions, e.g. if the condition is ">7", say, the .Formula1 property = 7, but there is no .Formula2 property, wheras if the condition is 1<>9 then there is a .Formual2 property.
I even considered trying the idea of using VarPtr to get references to the memory allocated to each .FormatConditions object and using an API function to directly compare the memory allocated to each object, but I could not find a suitable API function - besides, I'm not sure it would work.
Any thoughts?
Tony