+ Reply to Thread
Results 1 to 4 of 4

Populate a cell with a value if time falls within a certain range

  1. #1
    Registered User
    Join Date
    09-11-2009
    Location
    MN
    MS-Off Ver
    Office 2010
    Posts
    48

    Populate a cell with a value if time falls within a certain range

    I have a spreadsheet with about 3100 rows. Column B contains dates and column C contains times.

    I need to find out if the time in Column C falls between a range of times and then depending what range of times it falls in, I would like it to return a value into Column D. The time ranges and values I would like returned are as follows:

    Between 6:01 AM - 8:00 AM should return "Early"
    Between 8:01 AM - 11:00 AM should return "Morning"
    Between 11:01 AM - 3:00 PM should return "Afternoon"
    Between 3:01 PM - 10:00 PM should return "Evening"
    Between 10:01 PM - 6:00 AM should return "Overnight"

    So for example: C2 = 8:03 AM, I would like it to put "Morning" in D2.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Populate a cell with a value if time falls within a certain range

    Would this work for you in a lookup table?

    D1 =LOOKUP(E1,A1:B5)

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    09-11-2009
    Location
    MN
    MS-Off Ver
    Office 2010
    Posts
    48

    Re: Populate a cell with a value if time falls within a certain range

    I didn't even think to do it as a lookup, I kept thinking more complicated than it really needed to be. Works great. Thank you!

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Populate a cell with a value if time falls within a certain range

    I know what you mean, I often do the same thing.

    You're very welcome...glad you got it all sorted out and thanks for the feedback

+ 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