ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Function Greater than Less Than (https://www.excelbanter.com/excel-worksheet-functions/445499-if-function-greater-than-less-than.html)

Sher10

If Function Greater than Less Than
 
Hello, I was hoping someone can help me. I am preparing a banking spread sheet and 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", "")

I know the formula is close but not quite there.

Can someone please help.

Ie if my variance is $9.60 the cell needs to return "PROVIDE COMMENT"
if my variance is ($6.50) the cell needs to retun "PROVIDE COMMENT"

joeu2004[_2_]

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...","")

Sher10

Thankyou so much. That worked perfectly.

Quote:

Originally Posted by joeu2004[_2_] (Post 1599871)
"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...","")



All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com