Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default check if or not time lies between a time interval

i have different entry times with me and i want to know whether they were between 10 pm to 7 am,

so if i have an entry time of 1.40 am, the formulla should return me "incorrect"
and
say if the ebtry time is 10.00am, the formulla should return me "correct"

Can anyone please help me with this!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default check if or not time lies between a time interval

If your entry time is in A1 in Excel time format, put this formula in
B1:

=IF(AND(A1=7/24,A1<=22/24),"correct","incorrect")

Note that times are stored in Excel as fractions of a 24-hour day,
which explains why I have written the comparators as 7/24 and 22/24.

Hope this helps.

Pete

On Apr 18, 2:11*pm, Jaspreet281
wrote:
i have different entry times with me and i want to know whether they
were between 10 pm to 7 am,

so if i have an entry time of 1.40 am, the formulla should return me
"incorrect"
and
say if the ebtry time is 10.00am, the formulla should return me
"correct"

Can anyone please help me with this!!!

--
Jaspreet281


  #3   Report Post  
Junior Member
 
Posts: 3
Default

Thanks Pete, but watever time i choose in the excel its only showing in correct,

for instance i appliad it on 09.48am it still returned me Incorrect, actually this should be correct, sceondly as i mentioned what ever time i am taking the end result is incorrect only,

my target cell is in this format 11/5/2011 9:48:46 AM and its a 24hrs format.

Please suggest !


Quote:
Originally Posted by Pete_UK[_8_] View Post
If your entry time is in A1 in Excel time format, put this formula in
B1:

=IF(AND(A1=7/24,A1<=22/24),"correct","incorrect")

Note that times are stored in Excel as fractions of a 24-hour day,
which explains why I have written the comparators as 7/24 and 22/24.

Hope this helps.

Pete

On Apr 18, 2:11*pm, Jaspreet281
wrote:
i have different entry times with me and i want to know whether they
were between 10 pm to 7 am,

so if i have an entry time of 1.40 am, the formulla should return me
"incorrect"
and
say if the ebtry time is 10.00am, the formulla should return me
"correct"

Can anyone please help me with this!!!

--
Jaspreet281
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default check if or not time lies between a time interval

Hi Jaspreet,

Am Thu, 19 Apr 2012 05:00:36 +0000 schrieb Jaspreet281:

for instance i appliad it on 09.48am it still returned me Incorrect,
actually this should be correct, sceondly as i mentioned what ever time
i am taking the end result is incorrect only,

my target cell is in this format 11/5/2011 9:48:46 AM and its a 24hrs
format.


try:
=IF(OR(ROUND(MOD(A1,1),2)=22/24,ROUND(MOD(A1,1),2)<=7/24),"incorrect","correct")


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default check if or not time lies between a time interval

Jaspreet281 wrote:
i have different entry times with me and i want to
know whether they were between 10 pm to 7 am,


"Jaspreet281" wrote:
my target cell is in this format 11/5/2011 9:48:46 AM
and its a 24hrs format.


=IF(OR(HOUR(A1)<=7,22<=HOUR(A1)),"between","not between")

Change "<=" to "<" if you do not want to include 10pm and 7am.
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
Help with time interval [email protected] Excel Worksheet Functions 10 December 27th 08 11:08 PM
x-axis time interval John Charts and Charting in Excel 1 June 7th 08 02:23 AM
The best way to specify time interval ... nicgendron[_4_] Excel Programming 1 August 16th 05 04:02 PM
Time-interval protection Zurn[_15_] Excel Programming 0 September 29th 04 01:13 PM
Minimum time per interval Edmund Seet Excel Programming 7 August 27th 03 02:36 AM


All times are GMT +1. The time now is 09:00 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"