+ Reply to Thread
Results 1 to 4 of 4

Thread: If Statement Using a Time

  1. #1
    Registered User
    Join Date
    09-21-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    31

    If Statement Using a Time

    I have a list of times, 10:00 AM to 5:00 PM and these numbers will change. The issue I have is setting it up, so that I can say if(Cell B"X"=(TIME),"Yes","no"). I do not know what to insert in the parenthesis time spot.

    I want to find the function that lets me say if(B1=10:00 AM, "yes","no")
    Thanks for any help. Attached is the file. Cell F1 is an example
    Attached Files Attached Files
    Last edited by JoshF; 11-28-2011 at 10:10 AM. Reason: Answered

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566

    Re: If Statement Using a Time

    Hi,

    =IF(B1=TIME(10,0,0),"yes","no")
    Regards
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  3. #3
    Valued Forum Contributor GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2007/2010/2011
    Posts
    310

    Re: If Statement Using a Time

    I'd suggest you put a time selection in another cell (I used D1) and then reference it in the formula as follows:
    =IF(B1=D1,"yes","no")

    I'm not totally sure what else you want to do with this...

    ---Edit---
    oh, didn't see the first reply from RB that is pretty slick.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    09-21-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: If Statement Using a Time

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    =IF(B1=TIME(10,0,0),"yes","no")
    Regards
    Thanks a lot

+ 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.2.0