View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default If I am within the time specified..?

"... not getting accurate result ..." is not a very specific description of
your problem.
What were the values of A2, B2, and NOW() at the time of calculation, what
result did you get, and what result did you expect?
Why are you using OR for one case and AND for the other?
If you are trying to test for NOW() being between A2 and B2, doesn't your
OR(A2<NOW(),B2NOW()) want to be AND(B2<NOW(),A2NOW()) ?

Isn't it easier to use =NOW()=MEDIAN(A2,NOW(),B2) ?
But perhaps you want somewhat different results for some of the marginal
cases, where two or more of the 3 values are equal ?
--
David Biddulph

Kashyap wrote:
used =IF(B2<A2,OR(A2<NOW(),B2NOW()),AND(A2<NOW(),B2NO W()))

but not getting accurate result