ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Diff. in time (https://www.excelbanter.com/excel-worksheet-functions/6220-diff-time.html)

justmeisall

Diff. in time
 

Thanks for the quick response.

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

if the time portion of mm/dd/yy hh:mm Am in between say midnite and
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 to
get the return. What I'm wondering is, Is there a formula I can use so
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/yy
format

Thanks again


--
justmeisall
------------------------------------------------------------------------
justmeisall's Profile: http://www.excelforum.com/member.php...o&userid=16351
View this thread: http://www.excelforum.com/showthread...hreadid=277380


Camilo

=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!

"justmeisall" wrote:


Thanks for the quick response.

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

if the time portion of mm/dd/yy hh:mm Am in between say midnite and
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 to
get the return. What I'm wondering is, Is there a formula I can use so
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/yy
format

Thanks again


--
justmeisall
------------------------------------------------------------------------
justmeisall's Profile: http://www.excelforum.com/member.php...o&userid=16351
View this thread: http://www.excelforum.com/showthread...hreadid=277380




All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com