Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
AC man
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

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 6". 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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

What you need is:

=IF(AND(A2100,A2<200),6,"out of range")

You don't specify what you want if the condition is not met, but this
produces the text "out of range" - modify as appropriate.

Pete

  #3   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

=IF(AND(A2100,A2<200),6,"")

Vaya con Dios,
Chuck, CABGx3



"AC man" wrote:

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 6". 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.

  #5   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

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(C1<A1,C1B1),6,"")

Does that help?
--
Regards,
Dave


"AC man" wrote:

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 6". 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.



  #6   Report Post  
Posted to microsoft.public.excel.misc
Sloth
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

use the AND function

IF(AND(A2<200,A2100),6,"Not In Range")

"AC man" wrote:

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 6". 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.

  #7   Report Post  
Posted to microsoft.public.excel.misc
Sloth
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

You can also use the + and * symbols to substitute for and & or.

Example:
=IF((A2100)*(A2<200),6)
=IF((A2200)+(A2<100),6)

The first one is like saying if A2100 AND A2<200 then output 6. So if it
is in the range it is TRUE.
The second one is like saying if A2<100 OR A2200 then output 6. So if it
is out of the range it is TRUE. (I switched the < and symbols because every
real number is <200 or 100).

"AC man" wrote:

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 6". 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.

  #8   Report Post  
Posted to microsoft.public.excel.misc
AC man
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

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 6" in A2
If the range in A1 is 201-300 I want it to say 7" in A2
If the range in A1 is 301-400 I want it to say 8" in A2
If the range in A1 is 401-500 I want it to say 9" 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.


"CLR" wrote:

=IF(AND(A2100,A2<200),6,"")

Vaya con Dios,
Chuck, CABGx3



"AC man" wrote:

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 6". 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.

  #9   Report Post  
Posted to microsoft.public.excel.misc
Jonathan Cooper
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

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

"AC man" wrote:

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 6" in A2
If the range in A1 is 201-300 I want it to say 7" in A2
If the range in A1 is 301-400 I want it to say 8" in A2
If the range in A1 is 401-500 I want it to say 9" 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.


"CLR" wrote:

=IF(AND(A2100,A2<200),6,"")

Vaya con Dios,
Chuck, CABGx3



"AC man" wrote:

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 6". 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.

  #10   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

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(A2100,A2<200),6,IF(AND(A2200,A2<300,7,"" )

If you will have "many" increments, you might consider the VLOOKUP function.

Vaya con Dios,
Chuck, CABGx3


"AC man" wrote:

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 6" in A2
If the range in A1 is 201-300 I want it to say 7" in A2
If the range in A1 is 301-400 I want it to say 8" in A2
If the range in A1 is 401-500 I want it to say 9" 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.


"CLR" wrote:

=IF(AND(A2100,A2<200),6,"")

Vaya con Dios,
Chuck, CABGx3



"AC man" wrote:

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 6". 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.



  #11   Report Post  
Posted to microsoft.public.excel.misc
Sloth
 
Posts: n/a
Default IF than statement in a range of numbers? please help?

=VLOOKUP(A2,{100,6;200,7;300,8;400,9;500,#N/A},2,TRUE)

You can inbed a table like this into the VLOOKUP function, or use an actual
table. You will get an error if A2 is <100 ro 500. If you want to expand
the list (say to 1000+ - 15) you could do it like this.

=VLOOKUP(A2,{100,6;200,7;300,8;400,9;500,10;600,11 ;700,12;800,13;900,14;1000,15},2,TRUE)

with this formula anything <100 will result in an error, and anything 1000
is 15. You can use an IF statement to change this.

The VLOOKUP function finds the next smallest number and matches the value in
the table. So 243 will look at 200 and check column 2 of the table resulting
in 7.

Since you have a mathematical relationship, you can probably use a formula
like

=INT(A2/100)+5

This won't be exactly what you wanted (100-199 - 6, 200-299 - 7, etc.),
but you can use this formula to get closer

=INT((A2-1)/100)+5

for (101-200 - 6, 201-300 - 7, etc.)

"AC man" wrote:

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 6" in A2
If the range in A1 is 201-300 I want it to say 7" in A2
If the range in A1 is 301-400 I want it to say 8" in A2
If the range in A1 is 401-500 I want it to say 9" 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.


"CLR" wrote:

=IF(AND(A2100,A2<200),6,"")

Vaya con Dios,
Chuck, CABGx3



"AC man" wrote:

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 6". 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range of numbers in a formula...PLEASE HELP!!! jbf frylock Excel Worksheet Functions 9 January 6th 06 03:50 PM
Statistical smoothing a range of numbers - match average more clos Pasko1 Excel Worksheet Functions 1 December 16th 05 01:06 AM
Constructing range address given row and col numbers of boundaries [email protected] Excel Worksheet Functions 4 November 16th 05 04:23 PM
How to generate a list of randomly selected numbers within a range Bob Excel Worksheet Functions 2 November 7th 05 06:09 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"