+ Reply to Thread
Results 1 to 6 of 6

formula to insert 1 if time in and time out time is within the slots (military time)

  1. #1
    Registered User
    Join Date
    02-21-2020
    Location
    Santa F
    MS-Off Ver
    MS Office 10
    Posts
    3

    Unhappy formula to insert 1 if time in and time out time is within the slots (military time)

    What type of formula to insert 1 if time in and time out time is within the slots (military time)or leave blank if not within slot range? Example:

    Time In Time Out 7-8 8-9 9-10 10-11 11-12 12-13 13-14 14-15 15-16
    09:00 11:10 1 1 1 1
    12:00 15:00 1 1 1
    7:00 9:00 1 1
    10:00 12:20 1 1 1




    I am trying to use spreadsheet to show how many cases were within each hour I will have dates and day of the week also, but this was the one I'm having a hard time with. Is this possible?
    I appreciate your assistance.
    Last edited by AliGW; 02-22-2020 at 02:22 AM.

  2. #2
    Forum Guru
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    7,443

    Re: Formula

    I cannot post my formula.

    Your Solution is attached.

    Mod Edit:

    =IF(OR(HOUR($A2)=COLUMN()+4,HOUR($B2+59/24/60)=COLUMN()+5,AND(HOUR($A2) < COLUMN()+4,HOUR($B2+59/24/60) > COLUMN()+5)),1,"")
    Attached Files Attached Files
    Last edited by AliGW; 02-22-2020 at 02:26 AM.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    40,667

    Re: formula to insert 1 if time in and time out time is within the slots (military time)

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Almost everyone here needs s formula of some sort!

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. NAs you are new, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  4. #4
    Registered User
    Join Date
    02-21-2020
    Location
    Santa F
    MS-Off Ver
    MS Office 10
    Posts
    3

    Re: Formula

    How do I use this formula with 1/2 slots, like 7:30 - 12:30, 12:30 - 15:30?

  5. #5
    Registered User
    Join Date
    02-21-2020
    Location
    Santa F
    MS-Off Ver
    MS Office 10
    Posts
    3

    Re: Formula

    I like what this formula does. I need something similar. I need to calculated the minutes within a time slot. The time slots are in 1/2 hour increments. Example

    7:30 - 12:30, 12:30 - 15:30
    Times worked were:
    7:15 - 14:30. I need a formula to calculate how many minutes worked between 7:30 - 12:30.
    7:45 - 16:45 I need a formula to calculate how many minutes worked between 12:30 - 15:30.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2010/2019
    Posts
    10,139

    Re: formula to insert 1 if time in and time out time is within the slots (military time)

    This request might be resolved using a different arrangement/formula.
    The formula could be: =(MIN($B4,C$3)-MAX($A4,C$2))*24*60
    See that attached file for the arrangement.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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: 3
    Last Post: 01-10-2019, 09:34 AM
  2. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  3. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  4. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  5. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  6. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

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