+ Reply to Thread
Results 1 to 6 of 6

Filling in column based on date compare criteria

  1. #1
    Registered User
    Join Date
    04-15-2011
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Filling in column based on date compare criteria

    Hello,

    I am an Excel 2003 user.

    I need to populate a column in one sheet based on a date stamp record falling within start and end time stamps and an additional column value in a second sheet.

    I have tried a VLOOKUP function, but I do not know if that is the correct method. I have attached the spreadsheet.

    I need to:

    1. Check the start time column of the sheet called records.
    2. If that start time is greater than or equal to and less than or equal to the start time and end time columns of the team schedule sheet, then populate the team column in the records sheet with the corresponding team letter designation from the team schedule sheet.

    The VLOOKUP simply looked at the same row of the team schedule sheet as the records sheet; I don't know if it can examine the sheet in it's entirety. Also, I'm unsure of how to copy the team designation to the team column if a match occurs.

    Thank you for your time. I've spent a few hours looking up past threads here, but am not making much progress.
    Attached Files Attached Files
    Last edited by Mare0929; 04-19-2011 at 03:54 PM.

  2. #2
    Registered User
    Join Date
    04-15-2011
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Filling in column based on date compare criteria

    This may be more clear:

    I need to populate a column in a sheet based on a date stamp record falling within start and end time stamps.

    On one sheet, I have a start time record in column B. On another sheet, I have schedule data with both start and end time records as well as a team designation.

    I need to look at a record on sheet one, examine the time stamp, do a lookup in sheet two and find the first record in sheet two where the time stamp from sheet one is within the schedule start and end time record of sheet two. If so, I need to copy the team letter designation into the cell on sheet one.

    Sheet 1:
    col. A = blank, needs to be filled in with team letter
    col. B =time stamp of data event

    Sheet 2:
    col. A = shift start time
    col. B =shift end time
    col. C =team letter designation

    Thank you.

  3. #3
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Filling in column based on date compare criteria

    HI,

    Welcome to the forum.
    I checked your workbook and sorry to say I could not see where a vlookup would work. Also when I visually checked the data I could not see where the criteria you set would work. I looked at the data in column A of records and then checked the "team" sheet to see if the first time stamp in reports would be within the "Start" and "End" times for the "team" sheet.
    IE: 3/7/2011 5:59 could not be found in the "team" sheet.
    Is the data you provided correct?
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Filling in column based on date compare criteria

    hi, Mare0929, may it be sort of that?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-15-2011
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Filling in column based on date compare criteria

    Quote Originally Posted by watersev View Post
    hi, Mare0929, may it be sort of that?
    Thank you so much! I have downloaded the worksheet to review. Someone elsewhere suggested index/match, and this looks like another good solution.

  6. #6
    Registered User
    Join Date
    04-15-2011
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Filling in column based on date compare criteria

    Quote Originally Posted by Charles View Post
    HI,

    Welcome to the forum.
    I checked your workbook and sorry to say I could not see where a vlookup would work. Also when I visually checked the data I could not see where the criteria you set would work. I looked at the data in column A of records and then checked the "team" sheet to see if the first time stamp in reports would be within the "Start" and "End" times for the "team" sheet.
    IE: 3/7/2011 5:59 could not be found in the "team" sheet.
    Is the data you provided correct?
    The record time stamp should fall within the schedule start and end times. I believe the record above would match the team schedule on row 32 as it is after 5:30am and before 17:30.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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