logo
search
VBA & Macro Problems

How to Show the Last Editor of a Row in Excel

Phi Hung VoPhi Hung Vo Oct 22, 2026 869 views

Question details

The user wants to display the username of the person who last edited any data in a specific customer row within a shared Excel workbook.

How to Track and Show the Last Editor of a Row in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Collaborating on a shared spreadsheet where an audit trail is needed to identify which team member last modified specific customer records.
Observed behavior
Standard Excel formulas and worksheet features cannot natively identify or extract the username of the last person who edited a specific row.
Before you start

Ensure your workbook is saved as an Excel Macro-Enabled Workbook (.xlsm) and that all collaborating users have macros enabled in their Trust Center settings.

Solution 1Recommended

Use a VBA Macro to Record the Last Editor

Since standard Excel formulas cannot identify the last editor, you can implement a custom VBA Worksheet_Change event macro to automatically stamp the username whenever a row is modified.

This solution requires basic familiarity with the Excel VBA environment. The macro will run silently in the background and insert the user's system login name into a designated column whenever a change is detected in that specific row.

1
Open the VBA Editor

Press ALT + F11 on your keyboard to open the Microsoft Visual Basic for Applications window.

2
Access the Target Worksheet

In the Project Explorer pane on the left, double-click the specific worksheet (e.g., Sheet1) where your customer data is located.

3
Insert the Event Code

Paste a Worksheet_Change macro script into the code window. Ensure the code is programmed to check if the modified cell falls within your data range, and if so, write the Environ("username") output to your desired 'Last Editor' column in the Target.Row.

4
Save and Test

Close the VBA editor and save your file as a Macro-Enabled Workbook (.xlsm). Type new data into a customer row to verify that your username automatically appears in the specified column.

Use a VBA Macro to Record the Last Editor
Macro Security and Compatibility: This solution relies entirely on desktop VBA execution. It will not work if users edit the file using Excel Online or if their macro security settings block the script.
Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet Collaboration

If you need a lightweight, highly compatible alternative to Microsoft Office for managing complex spreadsheets and collaborating with teams, WPS Office is an excellent choice. It offers powerful data management tools and a familiar interface without the hefty subscription fees.

  1. 1. Download and Install: Visit the official WPS website to download the free WPS Office suite and run the installer on your device.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheets and open your existing .xlsx or .xlsm files directly. The formatting and data will remain perfectly intact.
  3. 3. Manage Data Smoothly: Utilize the Review tab tools to share your workbook, manage permissions, and collaborate efficiently with your team members.
Fully compatible with Microsoft Excel formats, including .xlsx, .xlsm, and .csv.Free and lightweight office suite with a familiar, easy-to-use interface.Built-in collaborative features to help track document versions effectively.Supports advanced array formulas and functions for complex data analysis.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the INFO or CELL formula show the username of the person editing?

Built-in Excel functions evaluate data based on the local environment and the current user's session. They cannot natively record historical edit actions or freeze the name of a user for a specific row once that user closes the file. Historical tracking requires a macro or version history feature.

Can I see the last editor without using VBA in newer Excel versions?

Yes, if you are using Excel for Microsoft 365 and the file is stored on OneDrive or SharePoint, you can right-click a cell or row and select 'Show Changes'. This opens a pane displaying the complete edit history, including the usernames of those who modified the cells.

Will the VBA macro tracking solution work in Excel Online?

No. Excel Online (the web browser version) does not support running VBA macros. Any Worksheet_Change event code will be ignored. For web collaboration, you must rely on the built-in 'Show Changes' or Version History features.

How do I find my current username registered in Excel?

You can check the username currently associated with your Excel application by clicking on File, selecting Options, and looking under the General tab in the 'Personalize your copy of Microsoft Office' section.