+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : If statement using Time Intervals

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    3

    If statement using Time Intervals

    I am trying to create a file that will tell me yes or no if a time falls between a certain period, for example, 5:00 and 13:00.
    I tried to use =IF(TIME(0,0,0)<F4<TIME(5,0,0),"Yes","No").
    This works if you are just trying to say greater or less then, but doesn't seem to work with both.

    Please help!!!

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

    Re: If statement using Time Intervals

    You need to do it like this:

    =IF(AND(TIME(0,0,0)<F4,F4<TIME(5,0,0)),"Yes","No")

    though you might need to change one of the < to <=

    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)

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