Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
between function?
I am trying to write an if function to find out if a value falls between two
numbers =if(AM7(is between 0.005 and 0.999),"etc","etc") Is there a function I can use to make this happen? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
between function?
Hi,
you can use =if(and(AM7+0.005,AM7<=0.999),etc,etc) "klh84" wrote: I am trying to write an if function to find out if a value falls between two numbers =if(AM7(is between 0.005 and 0.999),"etc","etc") Is there a function I can use to make this happen? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
between function?
"klh84" wrote:
=if(AM7(is between 0.005 and 0.999),"etc","etc") Ostensibly, you might want: =if(and(0.005<=AM7,AM7<=0.999),"etc1","etc2") But beware of such comparisons. Most decimal fractions, and those in particular, cannot be represented exactly. Moreover, if AM7 is formatted as Number with 3 decimal places, a number like 0.9991 might __appear__ to be 0.999, but it will fail the "between" test. It would be better to write: =if(and(0.005<=round(AM7,3),round(AM7,3)<=0.999), "etc1","etc2") Even better: if AM73 can be =round(formula,3), then the first comparison will work as intended. ----- original message ----- "klh84" wrote: I am trying to write an if function to find out if a value falls between two numbers =if(AM7(is between 0.005 and 0.999),"etc","etc") Is there a function I can use to make this happen? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
between function?
Use the AND function:
=IF(AND(AM7=0.005,AM7<=0.999),"etc","etc") -- Biff Microsoft Excel MVP "klh84" wrote in message ... I am trying to write an if function to find out if a value falls between two numbers =if(AM7(is between 0.005 and 0.999),"etc","etc") Is there a function I can use to make this happen? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |