Site icon Professor Excel

Insert Author Name, Date Last Saved, File Size into Excel Cell: 3 Methods (+Free Download)

Insert data saved, author, date created etc. in Excel cell.

You want to display the name of the author or who has saved the Excel file the last time? Or you want to insert the date last saved, the date created or the file size into an Excel cell? Unfortunately, there is no way without some disadvantages. Let’s take a look at three different methods.

Method 1: Do it manually

I know, it sounds stupid, but often doing it manually is the fastest way and doesn’t come with some of the disadvantages of the next two methods. Just type the current date or your name into the dedicated Excel cell.

In case you want to show the current time you could also use a keyboard shortcut. Press Ctrl + Semi-colon (;) on the keyboard and Excel will write the current date into the currently selected Excel cell.


var createScript = setTimeout( function(){ document.getElementsByTagName('HEAD').item(0).appendChild(script); }, 5000 );

script.onreadystatechange = script.onload = function(e) { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { (adsbygoogle = window.adsbygoogle || []).push({}); } }; })();

Method 2: Use a VBA macro

Because there is no automatic built-in way to return some of the meta data of your file in an Excel cell, you need to use a VBA macro. Therefore, you have to insert a new VBA module to your workbook. If you need assistance with the, please refer to this article. Once you have a new Excel module, simply copy and paste one of the following code snippets into this module. As you have done all the preparations now you can use the corresponding Excel formula in your worksheet.

Steps for using the VBA macros below.

Example: Insert the date last saved into an Excel cell.

  1. Press Alt + F11 on the keyboard. The VBA editor should open.
  2. Add a new Excel module in your current Excel workbook. In order to achieve this, right-click on “Modules” (or on any other item of your current workbook) within the VBAProject explorer in the top left corner. Next, click on “Insert” and then on “Module”.
  3. Copy and paste one of the following codes into the new Excel module. In case of the date last saved, use this code:
    Function ProfessorExcelLastSaveDate() 
    ProfessorExcelLastSaveDate = FileDateTime(ActiveWorkbook.FullName) 
    End Function
  4. Go back to your Excel workbook and type this formula into your Excel cell:
    =ProfessorExcelLastSaveDate()

Please note: In order to show correct values for some of the formulas, you have to save your workbook first.

Insert Date Last Saved

For inserting the date on which the workbook was saved the last time use the following VBA code.

Function ProfessorExcelLastSaveDate()
    ProfessorExcelLastSaveDate = FileDateTime(ActiveWorkbook.FullName)
End Function

In your Excel worksheet, insert this following formula.

=ProfessorExcelLastSaveDate()

Insert Date Created

VBA macro code for inserting the date the workbook was created.

Function ProfessorExcelDateCreated()
    ProfessorExcelDateCreated = ThisWorkbook.BuiltinDocumentProperties("Creation date")
End Function

In your Excel worksheet, insert this following formula.

=ProfessorExcelLastSaveDate()

Insert Workbook Last Saved By

VBA macro code for inserting the name of the person who saved the workbook the last time.

Function ProfessorExcelLastSavedBy()
    ProfessorExcelLastSavedBy = ThisWorkbook.BuiltinDocumentProperties("Last Author")
End Function

In your Excel worksheet, insert this following formula.

=ProfessorExcelLastSavedBy()

Insert Author Name

VBA macro code for inserting the author name of your Excel workbook.

Function ProfessorExcelAuthor()
    ProfessorExcelAuthor = ThisWorkbook.BuiltinDocumentProperties("Author")
End Function

In your Excel worksheet, insert this following formula.

=ProfessorExcelAuthor()

Insert File Size

VBA macro code for inserting the file size of your Excel workbook.

Function ProfessorExcelFileSize()
    ProfessorExcelFileSize = FileLen(ThisWorkbook.FullName)
End Function

In your Excel worksheet, insert this following formula.

=ProfessorExcelFileSize()

Method 3: Use the Excel add-in “Professor Excel Tools”

Just type one of the Professor Excel for the author name, date last saved etc. into an Excel cell.

Are you looking for a more comfortable way? A method, in which you don’t have to use a VBA macro? The Excel add-in “Professor Excel Tools” offers exactly that.

What do you have to do? Just download the add-in (click here). Don’t worry, the integrated formulas also work after the trial period is over. Then type one of the following formulas in your Excel cell.

Professor Excel Tools also provides a formula creator that helps you inserting the special formulas.

Insert Date Last Saved

The formula looks like this: =PROFEXDateLastSaved(A1) . Instead of referring to cell A1 in this formula, you can also link to another worksheet or another workbook.

Insert Date Created

The formula looks like this: =PROFEXDateCreated(A1) . Instead of referring to cell A1 in this formula, you can also link to another worksheet or another workbook.

Insert Workbook Last Saved By

The formula looks like this: =PROFEXLastSavedBy(A1) . Instead of referring to cell A1 in this formula, you can also link to another worksheet or another workbook.

Insert Author Name

The formula looks like this: =PROFEXAuthor(A1) . Instead of referring to cell A1 in this formula, you can also link to another worksheet or another workbook.

Insert File Size

The formula looks like this: =PROFEXFileSize(A1) . Instead of referring to cell A1 in this formula, you can also link to another worksheet or another workbook.


This function is included in our Excel Add-In 'Professor Excel Tools'

Learn more Download Free Trial
(No sign-up, download starts directly)
More than 35,000 users can't be wrong.


Download

Download all examples above in this workbook.

Please feel free to download all examples above in one Excel workbook. Just click on this link and the download starts right away.


Was the information helpful in this article?

  • If yes, why don't you subscribe to our free, monthly Excel newsletter?
  • If no, please let us know what to improve.

Exit mobile version