+ Reply to Thread
Results 1 to 5 of 5

If statement with timevalue

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,944

    If statement with timevalue

    hi,

    i want to add vba to check if inputted time is 00:00:05 or whatever user will input.

    Screenshot_23.png

    Please Login or Register  to view this content.
    but this is not catching this. How can i write the code?

    I do not want to use very strange strings like :

    Please Login or Register  to view this content.
    Please help,
    Best,
    Jacek
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: If statement with timevalue

    Use
    Please Login or Register  to view this content.
    for 5 seconds,
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: If statement with timevalue

    Try this modified your code a little
    Attached Files Attached Files
    Last edited by Keebellah; 04-19-2019 at 04:22 PM.

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,944

    Re: If statement with timevalue

    ok thank you!
    I found also solution.

    working:

    TimeValue(Format((activesheet.Cells(2, 4).Value), "hh:mm:ss"))

    Best,
    Jacek

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: If statement with timevalue

    Great, don't forget to mark the post 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. [SOLVED] Timevalue of Now
    By JYTS in forum Excel General
    Replies: 13
    Last Post: 08-07-2015, 08:42 AM
  2. [SOLVED] I need something in between DateValue() and TimeValue()
    By Banaticus in forum Excel General
    Replies: 4
    Last Post: 09-27-2014, 07:13 PM
  3. Timevalue help with spreadsheets
    By tlindstrom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2014, 03:27 PM
  4. Timevalue
    By merl4 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-02-2013, 08:40 AM
  5. if statement with timevalue? Tracking Time.
    By whywhybother in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2012, 08:58 PM
  6. timevalue
    By tomfromportage in forum Excel General
    Replies: 2
    Last Post: 03-24-2012, 05:20 PM
  7. [SOLVED] OnTime / TimeValue
    By Myriam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2005, 07:28 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