Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I need a function in XLs that works as below
return 0 if 0<my number<0.5 return 1 if 0.5<my number<1 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming your number between 0 and 1
=IF(AND(A10.5,A1<1),1,0) or =(A10.5)+0 "fati" wrote: I need a function in XLs that works as below return 0 if 0<my number<0.5 return 1 if 0.5<my number<1 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You didn't say what you wanted to happen if other values were entered, nor if
the value is 0.5. The following will return the text "Out of range" for any value 0 or below, 1 and above or for exactly 0.5: =IF(AND(F40,F4<0.5),0,IF(AND(F40.5,F4<1),1,"Out of Range")) To return 1 for 0.5: =IF(AND(F40,F4<0.5),0,IF(AND(F4=0.5,F4<1),1,"Out of Range")) To return 0 for 0.5: =IF(AND(F40,F4<=0.5),0,IF(AND(F40.5,F4<1),1,"Out of Range")) "fati" wrote: I need a function in XLs that works as below return 0 if 0<my number<0.5 return 1 if 0.5<my number<1 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=ROUND(A1,0) would do it, but you haven't said what you want to happen if
your number is equal to 0.5, or <=0, or =1. -- David Biddulph "fati" wrote in message ... I need a function in XLs that works as below return 0 if 0<my number<0.5 return 1 if 0.5<my number<1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|