Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default military time "if" formula

i have employees sign-in and sign-out using military time. I want to be able
to calculate if each employee was present at a certain hour. For example:
Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present between
those times?
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default military time "if" formula

I see a problem already as both instances should be Yes. Also you would
need the date as part of the sheet.

kmariab wrote:

i have employees sign-in and sign-out using military time. I want to be able
to calculate if each employee was present at a certain hour. For example:
Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present between
those times?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default military time "if" formula

=IF(OR(AND($A$1<=$A$2,$A3=$A$1,$A$2=$A3),AND($A$ 1=$A$2,OR($A3=$A$1,$A1=$A$4))),"Yes","No")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"kmariab" wrote in message
...
i have employees sign-in and sign-out using military time. I want to be
able
to calculate if each employee was present at a certain hour. For example:
Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present between
those times?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 213
Default military time "if" formula

i have employees sign-in and sign-out using military time. I want to
be able
to calculate if each employee was present at a certain hour. For
example: Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present
between those times?


With the Sign-in time in B13, Sign-out time in B14 and the Test time
in B15 ...


Maybe something like this would work for you:

=IF(B14<B13,IF(OR(B15=B13,B15<=B14),"Yes","No"),
IF(AND(B15B13,B15<B14),"Yes","No"))

Of course, this doesn't work if somebody stays for more than 24 hours.
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default military time "if" formula

Sorry, I had meant to type in: was the employee present at 15:00?, and the
answer to be NO.

"Bob I" wrote:

I see a problem already as both instances should be Yes. Also you would
need the date as part of the sheet.

kmariab wrote:

i have employees sign-in and sign-out using military time. I want to be able
to calculate if each employee was present at a certain hour. For example:
Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present between
those times?



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default military time "if" formula

Thanks for your help. I tried the formula, but it doesn't seem to work for
overnight shifts.

"MyVeryOwnSelf" wrote:

i have employees sign-in and sign-out using military time. I want to
be able
to calculate if each employee was present at a certain hour. For
example: Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present
between those times?


With the Sign-in time in B13, Sign-out time in B14 and the Test time
in B15 ...


Maybe something like this would work for you:

=IF(B14<B13,IF(OR(B15=B13,B15<=B14),"Yes","No"),
IF(AND(B15B13,B15<B14),"Yes","No"))

Of course, this doesn't work if somebody stays for more than 24 hours.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default military time "if" formula

Does mine?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"kmariab" wrote in message
...
Thanks for your help. I tried the formula, but it doesn't seem to work
for
overnight shifts.

"MyVeryOwnSelf" wrote:

i have employees sign-in and sign-out using military time. I want to
be able
to calculate if each employee was present at a certain hour. For
example: Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present
between those times?


With the Sign-in time in B13, Sign-out time in B14 and the Test time
in B15 ...


Maybe something like this would work for you:

=IF(B14<B13,IF(OR(B15=B13,B15<=B14),"Yes","No"),
IF(AND(B15B13,B15<B14),"Yes","No"))

Of course, this doesn't work if somebody stays for more than 24 hours.



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default military time "if" formula

I believe you will need to supply dates for all times involved other
wise you have a problem covering the 2 day shifts.

kmariab wrote:

Sorry, I had meant to type in: was the employee present at 15:00?, and the
answer to be NO.

"Bob I" wrote:


I see a problem already as both instances should be Yes. Also you would
need the date as part of the sheet.

kmariab wrote:


i have employees sign-in and sign-out using military time. I want to be able
to calculate if each employee was present at a certain hour. For example:
Sign-in: 8:00
Sign-out: 14:00
Was employee present at 9:00? Yes
Was employee present at 13:00? No

My problem arises when employee works overnight. For example:
Sign-in: 18:00
Sign-out: 3:00

Is there a formula that recognizes whether employee was present between
those times?




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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Formula to count number of time stamps within a range in a column having dates formatted as "custom" Sam Excel Discussion (Misc queries) 3 June 19th 07 12:33 AM
cannot use "Create List" and "Share Workbook" same time Devendra Excel Discussion (Misc queries) 0 October 26th 06 06:05 AM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 07:15 AM.

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

About Us

"It's about Microsoft Excel"