I am trying to creat an IF statement that will be true if the number falls
within a range of numbers. I want it to say IF A2 is less than 200 but
greater than 100 then this cell will display 6quot;. I only know how to write an
IF statement for a less than or equal to statment but I dont know how to make
it fall in a specific range of numbers. please help thanks.
What you need is:
=IF(AND(A2gt;100,A2lt;200),6,quot;out of rangequot;)
You don't specify what you want if the condition is not met, but this
produces the text quot;out of rangequot; - modify as appropriate.
Pete=IF(AND(A2gt;100,A2lt;200),6,quot;quot;)
Vaya con Dios,
Chuck, CABGx3
quot;AC manquot; wrote:
gt; I am trying to creat an IF statement that will be true if the number falls
gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; greater than 100 then this cell will display 6quot;. I only know how to write an
gt; IF statement for a less than or equal to statment but I dont know how to make
gt; it fall in a specific range of numbers. please help thanks.
=IF(AND(A2gt;100,A2lt;200),6,quot;quot;)
--
HTH
RP
(remove nothere from the email address if mailing direct)quot;AC manquot; lt;AC gt; wrote in message
...
gt; I am trying to creat an IF statement that will be true if the number falls
gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; greater than 100 then this cell will display 6quot;. I only know how to write
an
gt; IF statement for a less than or equal to statment but I dont know how to
make
gt; it fall in a specific range of numbers. please help thanks.
Try this. If your 'Max' number is in A1 (in this case 200), your 'Min'
number is in B1 (in this case 100), and the number you wish to test in C1, in
D1 put this formula:
=IF(AND(C1lt;A1,C1gt;B1),6,quot;quot;)
Does that help?
--
Regards,
Davequot;AC manquot; wrote:
gt; I am trying to creat an IF statement that will be true if the number falls
gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; greater than 100 then this cell will display 6quot;. I only know how to write an
gt; IF statement for a less than or equal to statment but I dont know how to make
gt; it fall in a specific range of numbers. please help thanks.
use the AND function
IF(AND(A2lt;200,A2gt;100),6,quot;Not In Rangequot;)
quot;AC manquot; wrote:
gt; I am trying to creat an IF statement that will be true if the number falls
gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; greater than 100 then this cell will display 6quot;. I only know how to write an
gt; IF statement for a less than or equal to statment but I dont know how to make
gt; it fall in a specific range of numbers. please help thanks.
You can also use the and * symbols to substitute for and amp; or.
Example:
=IF((A2gt;100)*(A2lt;200),6)
=IF((A2gt;200) (A2lt;100),6)
The first one is like saying if A2gt;100 AND A2lt;200 then output 6. So if it
is in the range it is TRUE.
The second one is like saying if A2lt;100 OR A2gt;200 then output 6. So if it
is out of the range it is TRUE. (I switched the lt; and gt; symbols because every
real number is lt;200 or gt;100).
quot;AC manquot; wrote:
gt; I am trying to creat an IF statement that will be true if the number falls
gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; greater than 100 then this cell will display 6quot;. I only know how to write an
gt; IF statement for a less than or equal to statment but I dont know how to make
gt; it fall in a specific range of numbers. please help thanks.
Thank you, if I want to continue on with the IF stetments how should I write
it.
If the range in A1 is 100-200 I want it to say 6quot; in A2
If the range in A1 is 201-300 I want it to say 7quot; in A2
If the range in A1 is 301-400 I want it to say 8quot; in A2
If the range in A1 is 401-500 I want it to say 9quot; in A2
and so forth...
What would the code look like, you dont have to write it all the way out.
Just enough so I can get an idea. Thank you.quot;CLRquot; wrote:
gt; =IF(AND(A2gt;100,A2lt;200),6,quot;quot;)
gt;
gt; Vaya con Dios,
gt; Chuck, CABGx3
gt;
gt;
gt;
gt; quot;AC manquot; wrote:
gt;
gt; gt; I am trying to creat an IF statement that will be true if the number falls
gt; gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; gt; greater than 100 then this cell will display 6quot;. I only know how to write an
gt; gt; IF statement for a less than or equal to statment but I dont know how to make
gt; gt; it fall in a specific range of numbers. please help thanks.
It looks to me like there is a mathamatical relationship to the answer you
want and the number ranges. Try this.
Assuming the number 101 is in cell A1.
=(ROUNDUP(A1,-2)/100) 4
This will turn 101, into a 2, then add 4 which equals 6.
the only problem might be, your range is inconsistent, because your first
range started at 100, and then skipped to 201
quot;AC manquot; wrote:
gt; Thank you, if I want to continue on with the IF stetments how should I write
gt; it.
gt; If the range in A1 is 100-200 I want it to say 6quot; in A2
gt; If the range in A1 is 201-300 I want it to say 7quot; in A2
gt; If the range in A1 is 301-400 I want it to say 8quot; in A2
gt; If the range in A1 is 401-500 I want it to say 9quot; in A2
gt; and so forth...
gt; What would the code look like, you dont have to write it all the way out.
gt; Just enough so I can get an idea. Thank you.
gt;
gt;
gt; quot;CLRquot; wrote:
gt;
gt; gt; =IF(AND(A2gt;100,A2lt;200),6,quot;quot;)
gt; gt;
gt; gt; Vaya con Dios,
gt; gt; Chuck, CABGx3
gt; gt;
gt; gt;
gt; gt;
gt; gt; quot;AC manquot; wrote:
gt; gt;
gt; gt; gt; I am trying to creat an IF statement that will be true if the number falls
gt; gt; gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; gt; gt; greater than 100 then this cell will display 6quot;. I only know how to write an
gt; gt; gt; IF statement for a less than or equal to statment but I dont know how to make
gt; gt; gt; it fall in a specific range of numbers. please help thanks.
It depends on how many increments you are going to use........if only a few
(7 or less), you can use a nested IF statement like......
=IF(AND(A2gt;100,A2lt;200),6,IF(AND(A2gt;200,A2lt;300,7,quot;quot; )
If you will have quot;manyquot; increments, you might consider the VLOOKUP function.
Vaya con Dios,
Chuck, CABGx3quot;AC manquot; wrote:
gt; Thank you, if I want to continue on with the IF stetments how should I write
gt; it.
gt; If the range in A1 is 100-200 I want it to say 6quot; in A2
gt; If the range in A1 is 201-300 I want it to say 7quot; in A2
gt; If the range in A1 is 301-400 I want it to say 8quot; in A2
gt; If the range in A1 is 401-500 I want it to say 9quot; in A2
gt; and so forth...
gt; What would the code look like, you dont have to write it all the way out.
gt; Just enough so I can get an idea. Thank you.
gt;
gt;
gt; quot;CLRquot; wrote:
gt;
gt; gt; =IF(AND(A2gt;100,A2lt;200),6,quot;quot;)
gt; gt;
gt; gt; Vaya con Dios,
gt; gt; Chuck, CABGx3
gt; gt;
gt; gt;
gt; gt;
gt; gt; quot;AC manquot; wrote:
gt; gt;
gt; gt; gt; I am trying to creat an IF statement that will be true if the number falls
gt; gt; gt; within a range of numbers. I want it to say IF A2 is less than 200 but
gt; gt; gt; greater than 100 then this cell will display 6quot;. I only know how to write an
gt; gt; gt; IF statement for a less than or equal to statment but I dont know how to make
gt; gt; gt; it fall in a specific range of numbers. please help thanks.
- Apr 21 Sat 2007 20:36
IF than statement in a range of numbers? please help?
close
全站熱搜
留言列表
發表留言