+ Reply to Thread
Results 1 to 3 of 3

How can I make a formula in Excel showing when the file modified?

  1. #1
    TMark
    Guest

    How can I make a formula in Excel showing when the file modified?

    I would like to have a formula in excel that checkes "date modified" of the
    file and shows this in a cell, so a user opening a file can see when the file
    was last saved/modified. I saw this when using SAP Business Warehouse tool
    but it was probably part of the program. Is there a possibility to to
    something like this with a normal excel file?

  2. #2
    TMark
    Guest

    RE: How can I make a formula in Excel showing when the file modified?

    heh, found it myself later:

    for others - use this macro:

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    With Target
    If .Count > 1 Then Exit Sub
    If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
    Application.EnableEvents = False
    If IsEmpty(.Value) Then
    .Offset(0, 1).ClearContents
    Else
    With .Offset(0, 1)
    .NumberFormat = "dd mmm yyyy hh:mm:ss"
    .Value = Now
    End With
    End If
    Application.EnableEvents = True
    End If
    End With
    End Sub

    Found on http://www.mcgimpsey.com/excel/timestamp.html.


  3. #3
    Arvi Laanemets
    Guest

    Re: How can I make a formula in Excel showing when the file modified?

    Hi

    Copy this UDF into your workbook's module

    Public Function LastModified(Optional parTime As Date)
    LastModified = ThisWorkbook.BuiltinDocumentProperties(12)
    End Function


    Now, you can enter into any cell of workbook the formula
    =LastModified()
    or, when you want to get the formula volatile
    =LastModified(TODAY())
    or
    LastModified(NOW())
    Format the cell with formula in any valid date(time) format.

    --
    Arvi Laanemets
    ( My real mail address: arvi.laanemets<at>tarkon.ee )



    "TMark" <[email protected]> wrote in message
    news:[email protected]...
    >I would like to have a formula in excel that checkes "date modified" of the
    > file and shows this in a cell, so a user opening a file can see when the
    > file
    > was last saved/modified. I saw this when using SAP Business Warehouse tool
    > but it was probably part of the program. Is there a possibility to to
    > something like this with a normal excel file?




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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