View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default If Function Greater than Less Than

"Sher10" wrote:
I want a comment to appear if the variance is Greater
than $5 or greater than ($5). I have used the formula
=if(and(m18<-5, M185), "PROVIDE COMMENT", "")


Ostensibly, change "AND" to "OR", to wit:

=if(or(m18<-5,m185),"...comment...","")

Alternatively, you could write:

=if(abs(m18)5,"...comment...","")