View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike Woodhouse[_2_] Mike Woodhouse[_2_] is offline
external usenet poster
 
Posts: 24
Default Array formula with IF

On May 10, 10:35 am, rosysnozzy
wrote:
Mike and Max,

Thanks for your help, but I still have some problems. Basically what I am
trying to achieve is a row of numbers which all must be at least 3 minutes
apart from each other, and if one is not, it will turn a different colour to
indicate it is incorrect. The problem I think with your answer Max is that
the formula only takes A3 into account, which is fine, but I could not then
allow the range B3:E3 to cross reference with the rest of the range too. With
Mike's answer, I am only interested in a single result, not multiples, that
being whether the whole range is 3 minutes apart, therefore correct. I hope
you can both continue to help, thank you :-)



Sorry - I've been missing for a few days (life, work, stuff like
that).

I think I get it now. How about this, if you haven't already found it
yourself:

{=IF(MIN(B3:E3-A3:D3)<3,"Bad","Good")}

So it calculates an array of intervals, B-A, C-B and so on, then
checks for the smallest, returning "Bad" if there is an interval less
than 3.

Mike