View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Formula for Dates

Daren wrote:
Hello,

I have four sets of dates that are supposed to occur in order. They are
formatted as the 3/14/2001 format in Excel. Column A has a start date,
column B has an intermediate date, column C has another intermediate date,
and column D has an end date. These are supposed to occur in order, but
necessarily do not. For example, a correct progression would be 1/31/2008
then 5/16/2008 then 10/1/2008 then 10/1/2011. Working with the OR function
for these dates it would return a true value, and it does. However, I need a
function to determine when any of the dates are out of order. That would be,
for example, the first intermediate date occurring before the start date.
Essentially, I need a function that would look at these four dates and return
a value of false when there are any of them that are out of order.

Thanks!


Another possible solution...with dates in A2:D2 put the following in E2 and
array-enter (CTRL+SHIFT+ENTER):

=SUM(IF(RANK(A2:D2,A2:D2,1)=COLUMN(A2:D2),1,0))=CO LUMNS(A2:D2)

This can be expanded to any number of dates just by increasing the ranges or
inserting columns.