+ Reply to Thread
Results 1 to 3 of 3

How do I reference a column of time that spands multiple days against a static range?

  1. #1
    Forum Contributor
    Join Date
    12-17-2008
    Location
    Vernon, CT
    Posts
    132

    How do I reference a column of time that spands multiple days against a static range?

    There is more data removed from the workbook attached for simplicity sake, but I can't figure out how to have column D look at the same row and determine if column A, for that row, falls within the Time Range table and places the appropriate shift in column D. So for example, D4 would look at A4 then see what range (F2:G4) that falls between and returns the corresponding cell from column H.

    I tried doing an index, but I was running into an issue with 3rd shift just kept continuing. I think it is because the date in the background of the cell changed.

    These times on this sheet will be adjusted often, but consecutive. I need the sheet to display what shift each start time falls on.

    I also tried converting time to a decimal and that also just kept continually added up and didn't reset.

    Any help would greatly be appreciated.

    Thanks
    Attached Files Attached Files
    Last edited by jayclinton; 01-12-2018 at 06:33 AM.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: How do I reference a column of time that spands multiple days against a static range?

    One way to do it.
    Split 3rd shift into two part.

    Then use something like below.
    =INDEX($H$2:$H$5,LOOKUP(MOD(A4,1),$F$2:$F$5,{1,2,3,4}))

    See attached.

    Edit: Oh wait. Index portion isn't needed... doh.
    =LOOKUP(MOD(A4,1),$F$2:$F$5,$H$2:$H$5)
    Attached Files Attached Files
    Last edited by CK76; 01-11-2018 at 04:59 PM. Reason: See Edit:
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Contributor
    Join Date
    12-17-2008
    Location
    Vernon, CT
    Posts
    132

    Re: How do I reference a column of time that spands multiple days against a static range?

    Ahhh! I see. That was perfect. Thanks so much.

    Quote Originally Posted by CK76 View Post
    One way to do it.
    Split 3rd shift into two part.

    Then use something like below.
    =INDEX($H$2:$H$5,LOOKUP(MOD(A4,1),$F$2:$F$5,{1,2,3,4}))

    See attached.

    Edit: Oh wait. Index portion isn't needed... doh.
    =LOOKUP(MOD(A4,1),$F$2:$F$5,$H$2:$H$5)

+ 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. [SOLVED] average time value between data in column for multiple days
    By bolo11 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2017, 04:22 AM
  2. Replies: 5
    Last Post: 03-30-2016, 08:35 AM
  3. Replies: 6
    Last Post: 11-10-2014, 12:39 PM
  4. How to split Time by days from one column to multiple columns?
    By SureshNaiduA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2013, 01:45 PM
  5. How to keep formatted table column reference static when autofilling
    By chrisjames25 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-14-2012, 10:23 AM
  6. Calculating time elapsed in days and count days within same range
    By michellem410 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-19-2008, 01:13 PM
  7. [SOLVED] Making column reference in INDIRECT non-static
    By Bob Tarburton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-10-2006, 03:10 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