跳到主要內容

如何在Excel中獲取並插入最後修改的用戶名?

本文將向您展示獲取上次修改的用戶名信息並將上次修改的用戶名信息插入Excel單元格的方法。

獲取Excel中當前工作簿的最後修改的用戶名
使用用戶定義的功能插入當前工作簿的最後修改的用戶名
使用Kutools for Excel輕鬆在單元格,頁眉或頁腳中插入用戶名


獲取Excel中當前工作簿的最後修改的用戶名

眾所周知,我們可以在當前工作簿的“高級屬性”對話框中獲取上次修改的用戶名信息。

如果您使用的是Excel 2007

您可以通過以下步驟獲取上次在Excel中修改當前工作簿的用戶名:

步驟1:點擊 辦公按鈕 >> Prepare >> 氟化鈉性能.

步驟2:然後將文檔窗格添加到工作表上方。 點擊 文檔屬性 >> 高級屬性.

步驟3:在彈出的“高級屬性”對話框中,您將看到 最後保存者: 信息下 統計 標籤。

如果您使用的是Excel 2010、2013或更高版本

如果您使用的是Microsoft Excel 2010或更高版本,則可以通過以下步驟獲取最後修改的用戶信息:

只需點擊 文件 > 聯繫我們 ,您將獲得 最後修改者 右側下方的信息 相關人員 部分。 請參閱以下屏幕截圖。


使用用戶定義的函數插入上次修改當前工作簿的用戶名

1:按住 ALT + F11 鍵打開 Microsoft Visual Basic for Applications 窗口。

2: 在裡面 Microsoft Visual Basic for Applications 窗口中,單擊 插入 > 模塊,然後將以下宏粘貼到“模塊窗口”中。 見截圖L

VBA代碼:在Excel中插入最後修改的用戶名

Function LastAuthor()
LastAuthor = ActiveWorkbook.BuiltinDocumentProperties("Last Author")
End Function

3: 按 其他 + Q 關閉鍵 Microsoft Visual Basic for Applications 窗口。

4。 選擇一個需要放置用戶名的單元格,輸入公式 = LastAuthor() 進入編輯欄,然後按 Enter 鍵。 然後,最後修改的用戶名立即插入到單元格中。 看截圖:


使用Kutools for Excel輕鬆在單元格,頁眉或頁腳中插入用戶名

您可以輕鬆地在Excel中的指定單元格,工作表頁眉或頁腳中插入用戶名。 插入工作簿信息 的效用 Excel的Kutools。 請執行以下操作。

申請前 Excel的Kutools首先下載並安裝.

1。 點擊 Kutools 加 > 工作簿 > 插入工作簿信息。 看截圖:

2。 在裡面 插入工作簿信息 對話框,您需要:

1)。 選擇 用戶名 在選項 資訊 部分。

2)。 如果要將用戶名插入指定的單元格,請在 範圍 框; 要將用戶名插入頁眉或頁腳,請選擇 or 頁腳 選項。

3)。 點擊 Ok 按鈕。 看截圖:

然後,用戶名將立即插入到指定位置。

  如果您想免費試用(30天)此實用程序, 請點擊下載,然後按照上述步驟進行操作。

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How can the Activeworkbook be dynamic?

I tried to no success the below code

LastSavedby = Range("A1").value.BuiltinDocumentProperties("Last Author")

Where in A1 contains the path of the file with the file name and extension
This comment was minimized by the moderator on the site
Hi! I, my case it doesn't work automatically, I need to press "enter" after the formula "= VBAProject.Module3.LastAuthor()".
How should i make it automatic?
Thank you
This comment was minimized by the moderator on the site
Hey, this code worked nicely. Is there a way I can display the user name if a ROW is adjusted? For example, I hhave Column K with the header "Last modified By", and I want to know who adjusted "each row" as this is a shared document. I have the below code for Date, which works like how I would want the name to work: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column > 11 Or Target.Row = 1 Then Exit Sub Application.EnableEvents = False Cells(Target.Row, 12) = Now Application.EnableEvents = True End Sub Please email me if possible
This comment was minimized by the moderator on the site
Hi. I would like to ask how to write the VBA codes to retrieve all current users which modifying on the worksheet. Thank You:)
This comment was minimized by the moderator on the site
thanks a lot for this helpful article. I used it and it worked well. can I get the last modified date on that sheet just like the username ? MANY THANKS
This comment was minimized by the moderator on the site
Can u pls help if iwant the user name to appear in aspreadsheet as and when the previous cell is filled by a user
This comment was minimized by the moderator on the site
Thanks, Cp & Jay Chivo :)
This comment was minimized by the moderator on the site
Sub UserName() Sheets("Sheet1").Range("A1").Value = Environ("username") End Sub --------------- Change the sheet name
This comment was minimized by the moderator on the site
I am runing excel 2007 and am getting the runtime error 9, script out of range as well. any way to make it work in excel 2007?
This comment was minimized by the moderator on the site
Excel 2010. Same time i would like to ask that is it possible to use this Subscript with another function script ? Thanks Naghman
This comment was minimized by the moderator on the site
[quote]Excel 2010. Same time i would like to ask that is it possible to use this Subscript with another function script ? Thanks NaghmanBy Naghman[/quote] With another script? What script? :-)
This comment was minimized by the moderator on the site
To get last saved date. Function LastSaveDate() Application.Volatile True LastSaveDate = FileDateTime(ThisWorkbook.FullName) End Function
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations