+ Reply to Thread
Results 1 to 4 of 4

IF condition of Time and Day

  1. #1
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    IF condition of Time and Day

    Hi to all. I go simple problem regarding of IF condition with time and day involved with it. The logic is, I have to column Start time and Day. If Start time column is beyond 6PM of Day Friday to 6AM Day Monday it will display a value of "Personal".

    Now if the Day is Monday with Start time of 6AM beyond to Friday 5:59PM for example it will display the value of "Business"

    here is my sample formula
    Please Login or Register  to view this content.
    my problem is when the Day is "Monday" and has a Start time of 5:59AM it should return "Personal.but it always return "Business".

    Kindly give me some help with my formula.Thanks a lot!
    Last edited by emina002; 02-21-2012 at 09:52 PM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: IF condition of Time and Day

    Try

    =IF(OR(F75="Saturday",F75="Sunday",AND(F75="Friday",D75>=--"18:00:00"),AND(F75="Monday",D75<--"06:00:00")),"P","B")

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: IF condition of Time and Day

    the "and" part
    D75>TIME(18,0,0),D75<TIME(6,0,0)
    cannot be met
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Re: IF condition of Time and Day

    thanks a lot Bob Phillips and martindwilson for your help.My problem has been solve.:D

+ 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