+ Reply to Thread
Results 1 to 2 of 2

Formula to calculate on what work shift that event occurred

  1. #1
    Registered User
    Join Date
    01-01-2009
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    3

    Formula to calculate on what work shift that event occurred

    Good Evening All,
    I could use a spot of help calculating which work shift an event occurred on with a workbook that has 1M or more records. Basic these are traffic counts or events.
    The imported data has the date and time of the event in this format 01/25/2019 5:46:53 PM UTC-05:00, i have extracted the time into its own column using =MID(A4,10,11) So I have the time of the event, and need to determine what shift the event occurred on Shift One 10:00pm-6:00am, Shift Two 6am-2pm, Shift 3 2pm-10pm

    I'm a little unsure of how to proceed here. I'm supposing an IF command for the times of each shift and then equals the name of the shift and I'm search for a solution. Will the passing of midnight break the formulas. The eventual is a count of of the number of records that occurred on a particular shift, and then present them in a table

    Any Help would be appreciated

    Jim Manning

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,701

    Re: Formula to calculate on what work shift that event occurred

    I don't think that MID function will give you correct times - it will return a text value that looks like a time.

    If you treat the times of the day like this:

    Midnight ….. Shift One
    6:00 am …. Shift Two
    2:00 pm …. Shift Three
    10:00pm …. Shift One

    the you can use that tabular layout to determine the shift from the time using a VLOOKUP formula.

    Hope this helps.

    Pete

+ 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. Calculate Date an Equity Drawdown Occurred, Non VBA
    By twillo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2017, 06:23 PM
  2. Replies: 1
    Last Post: 06-10-2016, 11:38 PM
  3. Replies: 11
    Last Post: 10-22-2015, 04:28 PM
  4. [SOLVED] Number of days since last event occurred
    By dafella in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2013, 04:16 AM
  5. How to tell the order in which an event occurred?
    By Camanarac in forum Excel General
    Replies: 6
    Last Post: 04-01-2011, 01:00 PM
  6. Replies: 2
    Last Post: 05-06-2010, 12:20 PM
  7. [SOLVED] Event Macro Calculate Does Not Work
    By Carl Bowman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2005, 12:05 AM

Tags for this Thread

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