+ Reply to Thread
Results 1 to 4 of 4

Display specific Text during set time of day?

  1. #1
    Registered User
    Join Date
    08-25-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    36

    Display specific Text during set time of day?

    Hi

    We use Excel Online to share a spreadsheet between various offices, all within the same country and time zone.

    However once per day we need exclusive access to the spreadsheet for various reasons. Naturally no one pays any attention and remain in the spreadsheet preventing us from opening it in full Excel mode.

    I was hope to add a formula to on of the cells that states something like the following

    =if Time is between 10am and 10.30 am display "Down for maintaince" else "OK to Edit.

    Is this possible?

    If not a formula may VBA?

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Display specific Text during set time of day?

    in A1
    =IF(AND(TEXT(NOW(),"hh:mm")>"10:00",TEXT(NOW(),"hh:mm")<="10:30:00"),"Down for maintenance","OK")

    Of course this still won't stop anyone from editing the file, it's just a message.
    Maybe VBA can prevent editing though that side of VBA is beyond me.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Display specific Text during set time of day?

    Hi,

    One way. Create a cell with the following formula ad name it say 'StopTest'
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This returns the current time

    Then in another cell somewhere
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If the intention is to prevent access to any cells in the workbook then I'd use a Workbook Open event macro which pops up a Userform with a label that contains the message and then closes the file down.

    See attached example which uses this workbook open event with a UserForm1
    To test change the TimeNow > 10 / 24 And TimeNow <= 10.5 / 24 to reflect a current time range.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    08-25-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    36

    Re: Display specific Text during set time of day?

    Hi

    Thank you to both people that replied.

    All I needed was the first response, I simply need a reminder message, however the second response does give me more options going forward if need be.

    Rep added to both replies.

    Thanks

+ 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. Formula to display an amount in a specific cell after a certain time
    By Saeber4777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-04-2018, 05:28 PM
  2. display of specific time stamp and a bit of sumif
    By xlyreb01 in forum Excel General
    Replies: 4
    Last Post: 09-19-2015, 02:29 PM
  3. Display dates of a specific day in a given period of time
    By krz1407 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2013, 09:42 AM
  4. Replies: 2
    Last Post: 08-05-2013, 07:32 PM
  5. [SOLVED] Lookup a value in another tab and display a specific text value
    By crachelle04 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-09-2013, 02:43 PM
  6. Display msgbox when specific text entered in specific range
    By Ali_Riza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-20-2012, 08:05 AM
  7. Extract specific text in Cell A1 and display in A2
    By Dave32 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-22-2008, 08:27 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