ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If statement (https://www.excelbanter.com/excel-discussion-misc-queries/246195-if-statement.html)

Anthony

If statement
 
In an if statement how do you code where the variable is between 2 numbers, eg
(minus) -10,000 and 10,000.

Much appreciated

Anthony

David Biddulph[_2_]

If statement
 
I don't understand your question.

Do you mean =IF(AND(A2-10000,A2<10000),"A2 is between the limits","A2 is
not between the limits") ?
If by "between" you want the limits to be inclusive, change to = and < to
<=
--
David Biddulph

Anthony wrote:
In an if statement how do you code where the variable is between 2
numbers, eg (minus) -10,000 and 10,000.

Much appreciated

Anthony





All times are GMT +1. The time now is 09:57 AM.

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