+ Reply to Thread
Results 1 to 10 of 10

A formula for certain time intervals

Hybrid View

  1. #1
    Registered User
    Join Date
    08-25-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    5

    A formula for certain time intervals

    Hi All,

    New user here and first post. I have a decent understanding of excel but was wondering if someone with a bit more knowledge can help on a small issue im having.

    We get a monthly report in excel which shows who has been in and out of our building and this has time stamps on each user who enters/exits. What i would like to know is, is there a formula which will calculate the time a user comes in and allocate an interval time to it?

    For e.g. We have 2 columns from this excel sheet, one is called "Time", the next is called "Interval". If we have 2 users, User A comes in at 09:32:45 - the interval I would like this to be; 09:30-18:00 (09:30 being the start time and 18:00 being the finishing time of the company), User B comes in at 09:05:26 - the interval for this would be 09:00-09:30.

    Is it possible to have excel detect the times from the "Time" column and assign the appropriate interval to this? Would be great as i am currently having to do this manually.

    Thanks,
    Has

  2. #2
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: A formula for certain time intervals

    Can you share the file with all the intervals
    Ash

  3. #3
    Registered User
    Join Date
    08-25-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    5

    Re: A formula for certain time intervals

    Hi,

    Please see attached spreadsheet.

    I have removed information from the other columns as they include sensitive data but if you see what i mean by the "Time" & "Interval" columns, it would be great if there was a formula or something i could put into the "Interval" column instead of manually inserting the intervals.

    Thanks,
    Has
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: A formula for certain time intervals

    Where do we see in your sheet Saccess which user is entered?

    I think VLookup can solve the problem.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    08-25-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    5

    Re: A formula for certain time intervals

    Quote Originally Posted by oeldere View Post
    Where do we see in your sheet Saccess which user is entered?

    I think VLookup can solve the problem.
    Like i mentioned, i have removed the first and last name of the users as this is sensistive data but the users column would usually have the first and last name of someone inside it.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: A formula for certain time intervals

    Then I have a questions to you:

    1) How can we solve the problem if we can't see who is entered?
    I supposed it was based on the name, but probably that is a false thought.

    2) What are the criteria to show the time in the result column?

  7. #7
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: A formula for certain time intervals

    please define the intervals like in this image
    Attached Images Attached Images

  8. #8
    Registered User
    Join Date
    08-25-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    5

    Re: A formula for certain time intervals

    Quote Originally Posted by Ash_Maverick View Post
    please define the intervals like in this image
    This is very similar to how mine is setup but please see the intervals I have below. Have also attached an updated excel sheet with some dummy information to make it less confusing.

    Begin Time End Time Interval
    08:00AM 09:00AM 08:00-09:00
    09:00AM 09:30AM 09:00-09:30
    09:30AM 18:00PM 09:30-18:00
    18:00PM 19:00PM 18:00-19:00
    19:00PM 08:00AM 19:00-08:00
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    05-06-2016
    Location
    Cluj, Romania
    MS-Off Ver
    2007-2010
    Posts
    220

    Re: A formula for certain time intervals

    Hi,
    Try this
    Formula: copy to clipboard
    =TEXT(INDEX($K$2:$K$6,IFERROR(MATCH(B2,$K$2:$K$6,1),5)),"HH:MM")&"-"&TEXT(INDEX($L$2:$L$6,IFERROR(MATCH(B2,$K$2:$K$6,1),5)),"HH:MM")

    It has created a list of the time intervals (K1:L6)
    Capture1.JPG
    see attached
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-25-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    5

    Re: A formula for certain time intervals

    Quote Originally Posted by TudyBTH View Post
    Hi,
    Try this
    Formula: copy to clipboard
    =TEXT(INDEX($K$2:$K$6,IFERROR(MATCH(B2,$K$2:$K$6,1),5)),"HH:MM")&"-"&TEXT(INDEX($L$2:$L$6,IFERROR(MATCH(B2,$K$2:$K$6,1),5)),"HH:MM")

    It has created a list of the time intervals (K1:L6)
    Attachment 477256
    see attached
    Hi Tudy,

    That works a charm.

    Many thanks for providing the formula. Much appreciated.

    Thanks,
    Has

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 09-14-2015, 11:00 AM
  2. Conditional Formatting Formula - Date & Time for intervals
    By jamesfxd in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-08-2015, 12:23 AM
  3. formula to fill large range of cells with time intervals exceeding 24 hours
    By mejia.j88 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-18-2014, 11:59 PM
  4. use of countif formula to calculate time intervals eg.15 min interval
    By sachin kokitkar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-25-2013, 10:32 AM
  5. Converting Data in Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 02:42 AM
  6. Need to Transpose Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2011, 08:30 PM
  7. [SOLVED] what is the formula for adding up time intervals?
    By thinkrabbit in forum Excel General
    Replies: 4
    Last Post: 05-24-2006, 02:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1