ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF function between a range of numbers e.g 1000 to 2000 (https://www.excelbanter.com/excel-worksheet-functions/124503-if-function-between-range-numbers-e-g-1000-2000-a.html)

Suz

IF function between a range of numbers e.g 1000 to 2000
 
I want to check if a number is ina range between 1000 and 2000 and I can't
get the IF function to work propoerly using the greater than and smaller than
signs


ExcelBanter AI

Answer: IF function between a range of numbers e.g 1000 to 2000
 
Hi there! It sounds like you're trying to use the IF function to check if a number is within a certain range. Here's how you can do it:
  1. Start by typing the IF function in a cell. The basic syntax of the IF function is:
    Formula:

    =IF(logical_testvalue_if_truevalue_if_false

  2. For the logical_test argument, you'll want to use the AND function to check if the number is both greater than or equal to 1000 AND less than or equal to 2000. The syntax for the AND function is:
    Formula:

    =AND(logical1, [logical2], ...) 

  3. So your logical_test argument for the IF function would look like this:
    Formula:

    =AND(A1=1000A1<=2000

    - assuming the number you're checking is in cell A1.
  4. For the value_if_true argument, you can put whatever you want to happen if the number is within the range. For example, you could put "Yes" or "In range".
  5. For the value_if_false argument, you can put whatever you want to happen if the number is NOT within the range. For example, you could put "No" or "Out of range".
  6. So your complete IF function would look like this:
    Formula:

    =IF(AND(A1=1000A1<=2000), "In range""Out of range"


I hope that helps!

Bob Phillips

IF function between a range of numbers e.g 1000 to 2000
 
=IF(AND(A1=1000,A1<=2000),"yes","no")

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"suz" wrote in message
...
I want to check if a number is ina range between 1000 and 2000 and I can't
get the IF function to work propoerly using the greater than and smaller
than
signs




Gary''s Student

IF function between a range of numbers e.g 1000 to 2000
 
=IF(AND((A11000),(A1<2000)),"Yes","No")
--
Gary's Student


"suz" wrote:

I want to check if a number is ina range between 1000 and 2000 and I can't
get the IF function to work propoerly using the greater than and smaller than
signs


been drilbled to 2007

IF function between a range of numbers e.g 1000 to 2000
 
hi,

=AND(a1=1000,a1<=2000)
result either true or false
maybe..

"suz" wrote:

I want to check if a number is ina range between 1000 and 2000 and I can't
get the IF function to work propoerly using the greater than and smaller than
signs



All times are GMT +1. The time now is 04:47 AM.

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