Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a function that, given a range (single cell) as an argument, will
determine if the cell has been conditionally formatted with EquationIs and, if yes, return the first formula as a text string. I tried: Function mnb(r As Range) As String mnb = r.FormatConditions(1).Formula1 End Function This almost works, but it returns equations with cell references translated to the location of the function call rather than the range in the call. For example, if the conditional formatting in C1 is formula =(C110) then =mnb(C1) should display =(C110), instead it is displaying =(Z10010) if =mnb(C1) happens to be in Z100. As a sub there is no problem: Sub macro3() Dim r As Range Dim s As String Set r = Selection s = r.FormatConditions(1).Formula1 MsgBox (s) End Sub Thanks in Advance -- Gary''s Student gsnu |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I convert conditional formatting into explicit formatting? | Excel Discussion (Misc queries) | |||
Formatting Conditional Formatting Icon Sets | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |