+ Reply to Thread
Results 1 to 5 of 5

Solving a time problem with conditional formatting

  1. #1
    Registered User
    Join Date
    02-03-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Solving a time problem with conditional formatting

    I have been trying to solve a problem of how to use conditional formatting to show a certain criteria. I need to know if an event happens between 07:30 and 16:30, I can work this out so that the cells show in green. I cannot solve the problem of formatting in red if the time is after 16:30 but before 07:30.

    =IF($E3>=$P$3,IF($E3<$Q$3,TRUE,FALSE))

    P3 = 07:30 and Q3 = 16:30


    By the way, thanks for letting me join the site, I love using Excel but this problem has beaten me and it's time to ask the clever people :-)

    Many thanks for your time.Time Problem.xlsx

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Solving a time problem with conditional formatting

    =not(AND($E3>=$P$3,$E3<=$Q$3))
    shall be enough

    (check in your case if you need >= <= or > < or a mix)
    Best Regards,

    Kaper

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Solving a time problem with conditional formatting

    welcome to the forum. you could shorten your existing formula to:
    =AND($E2>=$P$3,$E2<$Q$3)

    and for red, maybe another alternative is:
    =OR($E2<$P$2,$E2>=$Q$2)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    02-03-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Solving a time problem with conditional formatting

    Kaper

    Many thanks, it worked a treat your a genius! I would not have found that in 100 years :-)

  5. #5
    Registered User
    Join Date
    02-03-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Solving a time problem with conditional formatting

    Thank you for your help, I will try this when I have more time, Kapers solution worked great, but I will explore your option. Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-11-2012, 07:59 PM
  2. Solving Problem
    By jocpinmn in forum Excel General
    Replies: 2
    Last Post: 05-26-2007, 10:13 AM
  3. Time and Conditional Formatting Problem
    By jonhunt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-31-2006, 01:35 PM
  4. [SOLVED] Conditional Problem Solving
    By Andrew in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-14-2006, 12:45 AM
  5. Replies: 1
    Last Post: 02-04-2006, 06:10 PM

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