+ Reply to Thread
Results 1 to 11 of 11

Display Last Modified File Date In A Cell

  1. #1
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Display Last Modified File Date In A Cell

    I have tried a few different snippets of code, but I keep getting the NAME? error. All I want to do is display the last modified date in an excel cell using a user defined function. Below is the most recent snippet of code I am trying. Thanks.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,347

    Re: Display Last Modified File Date In A Cell

    Are you sure you spelled it correctly and put it in a module in the right sheet?
    Works fine for me.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Display Last Modified File Date In A Cell

    where did you put the code? into your personal workbook?

    if so then
    =PERSONAL.XLSB!lastmodified()
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Display Last Modified File Date In A Cell

    Look at this code and see if it serves your purpose

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: Display Last Modified File Date In A Cell

    Yes it's in my Personal Workbook. I have attached a picture of the module and the cell formula.Last Modified Cell.pngLast Modified VBA.png

  6. #6
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: Display Last Modified File Date In A Cell

    And I tried using =PERSONAL.XLSB!lastmodified() but get an error message saying PERSONAL.XLSB can't be found.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Display Last Modified File Date In A Cell

    Have you tried my code? Looked at it? ignored it?

  8. #8
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: Display Last Modified File Date In A Cell

    Hello alanisdman. I tried pasting your code into a module but didn't see the function ListAllFiles() show up. Is your code creating a user defined function?

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Display Last Modified File Date In A Cell

    seems Mac names the file differently
    essentially you need to put whatever the filename is for your personal macro list

    try this instead
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Display Last Modified File Date In A Cell

    I didn't realize that you were using a MAC. My code does not create a function. It is a straight VBA code.

  11. #11
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: Display Last Modified File Date In A Cell

    ='Personal macro workbook'!lastmodified()

    This code worked for me. Thank you everyone for your assistance.

+ 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. Display the last date and time modified of the file
    By dhens_82 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-05-2015, 06:20 AM
  2. Displaying Last modified date and time of file in a cell
    By modest_16081982 in forum Excel General
    Replies: 8
    Last Post: 12-20-2012, 03:51 PM
  3. Display modified date of spreadsheet in cell
    By Onesock in forum Excel General
    Replies: 8
    Last Post: 11-13-2012, 11:33 AM
  4. Display date in a cell when cell range or colum is modified
    By dr mint in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2012, 08:54 PM
  5. [SOLVED] Need a cell to display the modified date for external files
    By joseph.kelly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2012, 12:03 PM
  6. Showing file last modified date in a cell?
    By tangcla in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2009, 09:12 PM
  7. Display last date modified in cell
    By mikey9821 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-02-2007, 02:05 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