Diff. in time

J

justmeisall

Thanks for the quick response.

What I want is to be able to put an "if" formula in column be tha
would the following

if the time portion of mm/dd/yy hh:mm Am in between say midnite an
5Am, then return "overnight".

if the time portion of mm/dd/yy hh:mm Am in between say 5am and 11Am
then return "morning".

If I break out the time prtion into another cell, I have the formula t
get the return. What I'm wondering is, Is there a formula I can use s
that I don't have to break the time portion out into another cell?

Oh ya, now for the tough part, column A must stay in the mm/dd/y
format

Thanks agai
 
G

Guest

=IF(AND(HOUR(E18-(TRUNC(E18,0)))>17,HOUR(E18-(TRUNC(E18,0)))<24),"overnight",IF(AND(HOUR(E18-(TRUNC(E18,0)))>5,HOUR(E18-(TRUNC(E18,0)))<11),"morning"))

Not pretty, but it works! If the time is outside the criteria you set, the
function will return "FALSE".

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top