+ Reply to Thread
Results 1 to 4 of 4

Go to specific cell when actual date & time is between two dates & time

  1. #1
    Registered User
    Join Date
    02-19-2018
    Location
    Czech Republic
    MS-Off Ver
    Excel 2016
    Posts
    61

    Go to specific cell when actual date & time is between two dates & time

    Hi all,

    I would like to have a macro that goes to specific cell when actual date & time is between a fixed range of two dates & times

    For example, I have columns A and B with a fix range of dates and times:

    Example1.JPG

    And the goal is that if for example, the actual time is 11/01/2022 18:21, the expected result of the macro is to go to cell C5, because the actual time falls within the range of A5 and B5.

    Do you have please any idea how to achieve it?

    Thanks you all in advance!!
    Last edited by thorblow; 01-12-2022 at 07:17 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Go to specific cell when actual date & time is between two dates & time

    Demo file attached.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-19-2018
    Location
    Czech Republic
    MS-Off Ver
    Excel 2016
    Posts
    61

    Re: Go to specific cell when actual date & time is between two dates & time

    Works perfect! I put it inside a module instead of the sheet code and it works also fine

    Thanks!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Go to specific cell when actual date & time is between two dates & time

    When you put code into a standard module it operates by default on the active sheet. In this case that works fine but in general you may need to qualify the sheet references.

+ 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: 10
    Last Post: 11-23-2019, 01:15 AM
  2. Replies: 7
    Last Post: 09-17-2019, 07:52 PM
  3. Replies: 5
    Last Post: 08-31-2019, 10:20 AM
  4. [SOLVED] Formula/method to sort by specific time period within date+time ranges in cell
    By mikeskins84 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-13-2018, 01:12 PM
  5. [SOLVED] time sheet help, format TIME and formula based on the actual time entered.
    By bh mng in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-06-2016, 01:10 PM
  6. Actual Hold Time and Actual Talk Time
    By MaunishP in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2013, 08:15 AM
  7. [SOLVED] Show the date and time in a specific cell of last time we run a macro
    By dragon_m0nsta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2012, 04:49 AM

Tags for this Thread

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