+ Reply to Thread
Results 1 to 4 of 4

Highlight midnight time by macro.

  1. #1
    Forum Contributor visha_1984's Avatar
    Join Date
    11-27-2012
    Location
    Pune,India
    MS-Off Ver
    Excel 2010
    Posts
    290

    Highlight midnight time by macro.

    Dear All,

    i m doing GPS project ,need little help on this.
    i have excel data from software which include date and time,after so many attempt i have no idea.

    macro should read data and time and highlight cases which run in night blocked period.
    10:00 PM to 4:59 AM

    any help much appreciate.
    i have attached excel sheet for reference.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Highlight midnight time by macro.

    Highlight/select all the start and end values and then apply the Conditional Formatting formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Highlight midnight time by macro.

    Or

    =MEDIAN("4:59", MOD($B3, 1), "22:00") <> MOD($B3, 1)
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor visha_1984's Avatar
    Join Date
    11-27-2012
    Location
    Pune,India
    MS-Off Ver
    Excel 2010
    Posts
    290

    Re: Highlight midnight time by macro.

    Thanku very much ,it work perfectly.
    Happy to Help

    VISHA

    Click *, if the suggestion helps you!
    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>> "Mark your thread as Solved"

+ 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. How Can I Work Out a time Before Midnight and After Midnight???
    By ArmandDataCube in forum Excel General
    Replies: 7
    Last Post: 08-23-2017, 06:13 PM
  2. how to convert time if it's past midnight in military time
    By Jomejorada in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-15-2015, 07:50 AM
  3. [SOLVED] Text Time to Excel Format, Then Sort Time Past Midnight
    By BuntyMac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-27-2014, 03:13 AM
  4. time value after midnight
    By michelindb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-14-2013, 07:23 PM
  5. Calculating work time when end time is after midnight.
    By dpatchie in forum Excel General
    Replies: 1
    Last Post: 02-01-2012, 11:10 AM
  6. Replies: 4
    Last Post: 01-11-2012, 07:59 PM
  7. Midnight as TIME()
    By ZooTV92 in forum Excel General
    Replies: 8
    Last Post: 07-03-2011, 08:38 AM

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