+ Reply to Thread
Results 1 to 13 of 13

Excel desktop vs Excel in OneDrive - timestamp with Office Scripts?

  1. #1
    Registered User
    Join Date
    02-28-2024
    Location
    Slovakia
    MS-Off Ver
    365 E3
    Posts
    6

    Excel desktop vs Excel in OneDrive - timestamp with Office Scripts?

    Hello,
    using sheet with some informations.
    There are some columns with text and one column with datetime (VBA). That column has this:

    Please Login or Register  to view this content.
    VBA code:
    Please Login or Register  to view this content.
    In desktop app it works fine. Problem is if I have this document in onedrive/sharepoint because there is word "NAME?" instead of datetime.
    Please Login or Register  to view this content.
    Can anybody help me how to fix that please?
    Thank you.
    Last edited by AliGW; 02-28-2024 at 03:25 AM. Reason: Thread title improved.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Excel desktop vs Excel in OneDrive - problem with datetime

    VBA does not work in the browser environment.

    Try a formula, e.g

    =TEXT(NOW(), "dd.mm.yyyy hh:mm:ss")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-28-2024
    Location
    Slovakia
    MS-Off Ver
    365 E3
    Posts
    6

    Re: Excel desktop vs Excel in OneDrive - problem with datetime

    Hello AliGW,
    thank you for your response. Tried to add =TEXT(NOW(), "dd.mm.yyyy hh:mm:ss") instead of =EntryTime(A1) but it shows me there is an error in that.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Excel desktop vs Excel in OneDrive - problem with datetime

    Works here. Attach a sample workbook.

    Where is SK? That's not much use to us. Are you in Europe? Maybe you need this:

    =TEXT(NOW(); "dd.mm.yyyy hh:mm:ss")

  5. #5
    Registered User
    Join Date
    02-28-2024
    Location
    Slovakia
    MS-Off Ver
    365 E3
    Posts
    6

    Re: Excel desktop vs Excel in OneDrive - problem with datetime

    =TEXT(NOW(); "dd.mm.yyyy hh:mm:ss")
    this works without error. But I need to show datetime after text entry in first column.

    So every row will have different datetime.

    For example, if I add some text in A1, B1 will have datetime. If I add another text in A2, B2 will have different time.

    SK is slovakia

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Excel desktop vs Excel in OneDrive - problem with datetime

    See if this will work for you: https://www.easyexcelanswers.com/timest.html

    https://support.microsoft.com/en-gb/...7-1b49cd50d123

    Please change SK to Slovakia in your profile. Thanks.

  7. #7
    Registered User
    Join Date
    02-28-2024
    Location
    Slovakia
    MS-Off Ver
    365 E3
    Posts
    6

    Re: Excel desktop vs Excel in OneDrive - problem with datetime

    It works fine in Desktop. datetime shows without problem. In onedrive cells with datetime are blank without errors.

    =IF(A110<>"";IF(E110="";NOW();E110); "")

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Excel desktop vs Excel in OneDrive - problem with datetime

    OK - in that case, you are going to need to look into Office Scripts, if it's available to you. I cannot help you with that, I am afraid.

    https://learn.microsoft.com/en-us/ja...office-scripts

    I've amended your thread title. Good luck!

  9. #9
    Registered User
    Join Date
    02-28-2024
    Location
    Slovakia
    MS-Off Ver
    365 E3
    Posts
    6

    Re: Excel desktop vs Excel in OneDrive - timestamp with Office Scripts?

    understand, thank you.

    Maybe there is any way to force users to open url link with xlsm in desktop app?

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Excel desktop vs Excel in OneDrive - timestamp with Office Scripts?

    I don't think so - you'd need to instruct them how to do that themselves (not foolproof, as I know from my own experience).

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Excel desktop vs Excel in OneDrive - timestamp with Office Scripts?


  12. #12
    Registered User
    Join Date
    02-28-2024
    Location
    Slovakia
    MS-Off Ver
    365 E3
    Posts
    6

    Re: Excel desktop vs Excel in OneDrive - timestamp with Office Scripts?

    ok thank you for all.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Excel desktop vs Excel in OneDrive - timestamp with Office Scripts?

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, remember that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

+ 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: 1
    Last Post: 01-13-2024, 11:53 PM
  2. OneDrive and Excel VBA
    By HansieHansie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2023, 07:52 AM
  3. Company switched to OneDrive = Broken VBA code where it performs a SaveAs to desktop
    By Steve@Rugby in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2022, 05:03 AM
  4. [SOLVED] excel desktop not linking web data with excel in onedrive online
    By Peterino in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-31-2020, 06:51 PM
  5. Excel formula referencing another Excel workbook on Sharepoint/Onedrive
    By Renoux in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2019, 08:05 AM
  6. last datetime in excel
    By mdek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-25-2016, 04:39 AM
  7. datetime column in excel
    By rammo in forum Excel General
    Replies: 3
    Last Post: 05-02-2007, 01: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