#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Time Calc

I have in one cell (say A1) time displayed as 16:45 (excel shows it as
11/6/2007 4:45:38 PM in the bar at the top). I am trying to create an if
statement in another cell to calculate if the time in cell A1 is between a
certain time frame (say 18:00-23:59) and to give me a 1 or a 0 based on the
calc. How can I convert the time in Cell A1 to a number without the date
showing?

=IF(AND(A1=0.75,A1<1),1,0)


Any Help Greatly Appreciated.

Thanks

Robert B.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Time Calc

Hi Robert,

=IF(AND(MOD(A1,1)=0.75,MOD(A1,1)<1),1,0)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Robert B." wrote in message ...
|I have in one cell (say A1) time displayed as 16:45 (excel shows it as
| 11/6/2007 4:45:38 PM in the bar at the top). I am trying to create an if
| statement in another cell to calculate if the time in cell A1 is between a
| certain time frame (say 18:00-23:59) and to give me a 1 or a 0 based on the
| calc. How can I convert the time in Cell A1 to a number without the date
| showing?
|
| =IF(AND(A1=0.75,A1<1),1,0)
|
|
| Any Help Greatly Appreciated.
|
| Thanks
|
| Robert B.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Time Calc

=IF(AND(MOD(A1,1)=TIME(18,0,0),MOD(A1,1)<=TIME(23 ,59,59)),1,0)


I changed the 23:59 to 23:59:59, replace the last 59 with 0 is you really
wanted 1 minute to midnight
--


Regards,


Peo Sjoblom


"Robert B." wrote in message
...
I have in one cell (say A1) time displayed as 16:45 (excel shows it as
11/6/2007 4:45:38 PM in the bar at the top). I am trying to create an if
statement in another cell to calculate if the time in cell A1 is between a
certain time frame (say 18:00-23:59) and to give me a 1 or a 0 based on
the
calc. How can I convert the time in Cell A1 to a number without the date
showing?

=IF(AND(A1=0.75,A1<1),1,0)


Any Help Greatly Appreciated.

Thanks

Robert B.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Time Calc

Mr. Sjoblom,

Thanks so much - worked perfectly. I know that I would not have gotten it
without your help.

Robert B.

"Peo Sjoblom" wrote:

=IF(AND(MOD(A1,1)=TIME(18,0,0),MOD(A1,1)<=TIME(23 ,59,59)),1,0)


I changed the 23:59 to 23:59:59, replace the last 59 with 0 is you really
wanted 1 minute to midnight
--


Regards,


Peo Sjoblom


"Robert B." wrote in message
...
I have in one cell (say A1) time displayed as 16:45 (excel shows it as
11/6/2007 4:45:38 PM in the bar at the top). I am trying to create an if
statement in another cell to calculate if the time in cell A1 is between a
certain time frame (say 18:00-23:59) and to give me a 1 or a 0 based on
the
calc. How can I convert the time in Cell A1 to a number without the date
showing?

=IF(AND(A1=0.75,A1<1),1,0)


Any Help Greatly Appreciated.

Thanks

Robert B.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Time Calc

Mr. Otten,

Thanks so much - worked perfectly. I know that I would not have gotten it
without your help.

Robert B.

"Niek Otten" wrote:

Hi Robert,

=IF(AND(MOD(A1,1)=0.75,MOD(A1,1)<1),1,0)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Robert B." wrote in message ...
|I have in one cell (say A1) time displayed as 16:45 (excel shows it as
| 11/6/2007 4:45:38 PM in the bar at the top). I am trying to create an if
| statement in another cell to calculate if the time in cell A1 is between a
| certain time frame (say 18:00-23:59) and to give me a 1 or a 0 based on the
| calc. How can I convert the time in Cell A1 to a number without the date
| showing?
|
| =IF(AND(A1=0.75,A1<1),1,0)
|
|
| Any Help Greatly Appreciated.
|
| Thanks
|
| Robert B.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Time Calc

=IF(AND(A1=0.75,A1<1),1,0)

Would this work?

= --(HOUR(A1)=18)

--
Dana DeLouis


"Robert B." wrote in message
...
I have in one cell (say A1) time displayed as 16:45 (excel shows it as
11/6/2007 4:45:38 PM in the bar at the top). I am trying to create an if
statement in another cell to calculate if the time in cell A1 is between a
certain time frame (say 18:00-23:59) and to give me a 1 or a 0 based on
the
calc. How can I convert the time in Cell A1 to a number without the date
showing?

=IF(AND(A1=0.75,A1<1),1,0)


Any Help Greatly Appreciated.

Thanks

Robert B.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calc time value kevcar40 Excel Discussion (Misc queries) 3 November 1st 07 01:49 PM
Calc F9) Button and time. Timmy Mac1 Excel Discussion (Misc queries) 3 November 9th 05 06:40 PM
Time Calc - 24hrs vs 0hrs Ltat42a Excel Discussion (Misc queries) 9 October 19th 05 09:14 PM
time sheet calc by time in and out JenMo Excel Worksheet Functions 1 June 7th 05 06:23 PM
Problem with time calc Tom Excel Worksheet Functions 2 November 6th 04 12:04 PM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"