+ Reply to Thread
Results 1 to 2 of 2

Return a value based on a time range

  1. #1
    Registered User
    Join Date
    07-01-2012
    Location
    Oregon
    MS-Off Ver
    Excel 2003
    Posts
    1

    Return a value based on a time range

    Hello,
    Let's say that I have 3 columns of data: Client, Time, Zone
    What I need is to have a formula in the Zone column that looks at the time in the Time column and returns one of 3 values.

    Zone 1 = any time between 8:00am and 11:00am
    Zone 2 = any time between 11:01am and 2:00pm
    Zone 3 = any time between 2:01pm and 5:00pm

    So if data in Time column = 8:31 am then the value in Zone column should = 1

    I hope this makes sense without a file attached. Thanks in advance!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,048

    Re: Return a value based on a time range

    Here, try this:

    =LOOKUP(H4,{8,11,14}/24,{1,2,3})

    This will return you NA error for any time less than 8:00. What do you want with 6:53 for example?
    Never use Merged Cells in Excel

+ 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