Before/after date

M

Matt

I would like to use a formula to tell whether one date and time is
earlier or later than another.

In cell A1: 4/7/07 1:00PM

In cell B1: 4/4/07 5:00PM

The formula I tried in cell C1 is =if(A1>=B1,1,0)
but this formula does not do what I am trying to do. Why? Is there a
better way to approach this?
 
P

Peo Sjoblom

What are you trying to do? Your formula should return 1 if the dates + times
are numbers?
 
M

Matt

What are you trying to do? Your formula should return 1 if the dates + times
are numbers?


What I am actually trying to do is as follows:
I have hundreds of dates/times and their corresponding temps. I want
to be able to take the average of all temps that fall between two user-
input date/times.

Date & Time Temp
4/7/07 7:00AM 76
4/7/07 7:05AM 78
..
..
..
4/8/07 5:00PM 81

When I couldn't get this to work, I found that using > and < to
determine whether one date/time was earlier or later than another was
the part that was not working. Do you know why? Or have a better
suggestion?
 
Top