Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wrong output
Hi, when I want to get the operator from a conditional format in Excell the formula returns a: "1" for "between "5" for greather than ... The formula I use is Cells(Row, 2) = Cell.FormatConditions(1).Operator with Cell As Range Is this a wrong declaration or do I have to change something else in m formula. Thanks Steve -- Steven E ----------------------------------------------------------------------- Steven E.'s Profile: http://www.excelforum.com/member.php...fo&userid=1512 View this thread: http://www.excelforum.com/showthread.php?threadid=26845 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wrong output
Hi Steven,
Steven E. wrote: when I want to get the operator from a conditional format in Excell, the formula returns a: "1" for "between "5" for greather than .. The formula I use is Cells(Row, 2) = Cell.FormatConditions(1).Operator with Cell As Range Is this a wrong declaration or do I have to change something else in my formula. Not quite sure what you're looking for. If you want the actual operator (ie, "", "<", "=", "between"), you'll have to write it back based on the constant returned from the Operator property. Here's an example of a user-defined function: Public Function GetCFOperator(rngTarget As Range, _ Optional nCFIndex As Integer = 1) As Variant On Error GoTo ErrHandler Select Case rngTarget.FormatConditions(nCFIndex).Operator Case xlLess GetCFOperator = "<" Case xlGreater GetCFOperator = "" Case xlBetween GetCFOperator = "between" Case xlEqual GetCFOperator = "=" Case Else GetCFOperator = "other" End Select ExitRoutine: Exit Function ErrHandler: GetCFOperator = CVErr(1004) Resume ExitRoutine End Function -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help for getting output | Excel Discussion (Misc queries) | |||
Wrong output returned during IF function | Excel Worksheet Functions | |||
Insert Calculated Field (wrong Qty*Price = wrong Amount) | Excel Discussion (Misc queries) | |||
Output to CSV | Excel Programming | |||
Getting output from an excel output back to cscript.. | Excel Programming |