+ Reply to Thread
Results 1 to 2 of 2

Unable to conditional format using a VBA timestamp

  1. #1
    Registered User
    Join Date
    05-19-2021
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    1

    Unable to conditional format using a VBA timestamp

    I have a problem with a work file - the workbook contains a macro which uses double click to insert a user ID and timestamp. I would like to conditionally format column F so that if the timestamp is past a certain time (column E) it will highlight in red, and if the timestamp is before a certain it will highlight in green.

    I may be over complicating things, but i have extracted the time portion of the timestamp into column Q using "RIGHT(F4,11)" but for some reason the it won't format.

    Any help is much appreciated.

    Capture.JPGCapture.JPGCapture.JPG

  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
    48,164

    Re: Unable to conditional format using a VBA timestamp

    Difficult to know from looking at a picture. But the RIGHT function produces a Text output so you won't be comparing a true time value.
    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


+ 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. Unable to match Conditional format
    By onp in forum Excel General
    Replies: 1
    Last Post: 02-21-2020, 10:20 PM
  2. Extract date from SQL timestamp format
    By shayma in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-10-2015, 06:08 AM
  3. [SOLVED] Need Formula to Change Date Format without changing the timestamp
    By siobeh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-13-2014, 04:41 PM
  4. [SOLVED] Excel Timestamp format editing
    By soxsrules in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2013, 01:19 PM
  5. [SOLVED] timestamp macro h:mm:ss format error message
    By drsuis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2013, 02:06 PM
  6. [SOLVED] Timestamp Conditional Formating
    By TonyforVBA in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2012, 12:23 PM
  7. Timestamp format
    By MedTech in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2009, 12:51 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