+ Reply to Thread
Results 1 to 4 of 4

Add time but ignore period of time

  1. #1
    Registered User
    Join Date
    02-08-2016
    Location
    Rotherham, England
    MS-Off Ver
    365
    Posts
    8

    Add time but ignore period of time

    Hi, I have some data where I an pulling out the hour that an incident was logged, so simply using =HOUR. I then want to add a number of hours to this log hour, so for example if an incident was logged in hour 15 (3pm), and I want to add 4hrs, it gives me hour 19 (7pm); fairly simple. However, I need it to ignore a window of time. So, if an incident was logged in hour 22, and I want it to add 4hrs but ignore hours 23 to 7 (through the night), I want it to show hour 10, ie 1 hr from 22-23, and then 3 from 7 to 10. Any suggestions?

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

    Re: Add time but ignore period of time

    Can you upload a file with examples.
    Ash

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,188

    Re: Add time but ignore period of time

    Try this ...

    =MOD(A1+4+(A1>18)*8,24)
    Last edited by Phuocam; 09-14-2016 at 08:08 AM.

  4. #4
    Registered User
    Join Date
    02-08-2016
    Location
    Rotherham, England
    MS-Off Ver
    365
    Posts
    8

    Re: Add time but ignore period of time

    Many thanks for that. It seems to work in some instances but not where the incident has been logged after midnight, in those instances it just added the 4hrs to the log hour.

+ 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. Time Related Data applied over time period
    By dooleygj in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-11-2014, 06:54 AM
  2. [SOLVED] Divide Time Period across different Time Frames (Calculating Interest)
    By kopapa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2013, 03:09 PM
  3. Replies: 0
    Last Post: 07-25-2013, 10:03 AM
  4. Replies: 10
    Last Post: 07-13-2013, 05:20 AM
  5. [SOLVED] Help taking a time from one field and outputting a time period in a different column
    By Hidden_Gecko in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-07-2013, 12:42 AM
  6. Replies: 11
    Last Post: 05-20-2011, 02:09 PM
  7. Replies: 2
    Last Post: 04-27-2011, 08:21 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