View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_7_] Peter T[_7_] is offline
external usenet poster
 
Posts: 162
Default Calling operators in formulas


"Matthew Dyer" wrote in message

So I can define a name that encapsulates the 'formula' I want to evaluate,
then use the evaluate formula to do the evaluation, but I cannot directly
use 'greater than' instead of the text ''. I like the workaround


Yes EVALUATE is also Macro4 function which you can use in a named formula,
eg

=EVALUATE(Sheet1!$A$2&Sheet1!$A$1&Sheet1!$A$3)

Note where the cursor is when defining, depending on usage you may or may
not want the $'s in the named formula.

If all you want to do is cater for the 4 comparison operators

=IF(A1="",A2A3,IF(A1="=",A2=A3,IF(A1="<",A2<A3 ,IF(A1="<=",A2<=A3))))

With an additional IF could include "="

Easily adapted for 'greater than'

Could also be defined as a named formula

Peter T