How to Search and Edit Filtered Excel Table Results Using VBA
Question details
The user needs to edit specific columns (J and K) of filtered search results within an Excel table, but the current filtered view prevents direct editing.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Searching for a specific name in a large table to quickly update related information in columns J and K.
- Observed behavior
- The table displays matching names when filtered, but the resulting filtered cells in columns J and K cannot be edited as required.
Always create a backup copy of your Excel workbook before implementing VBA macros, as macro actions typically cannot be undone using the standard Undo feature.
Use a VBA Macro to Filter and Edit In-Place
Applying a VBA macro allows you to filter the original table in place, enabling direct edits to the matching records.
When you extract data using advanced formulas or copy-paste methods, the resulting data is disconnected from the original dataset, preventing direct edits. By using a VBA macro to filter the original table in place, any changes you make to columns J and K are saved directly to the source data.
Press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) Editor.
In the top menu, click Insert and select Module to create a blank script window.
Write or paste the VBA code designed to filter your specific table range based on your search criteria.
Close the VBA editor. Go to File > Save As, and choose Excel Macro-Enabled Workbook (*.xlsm) from the format dropdown.
Run the macro to filter the names, then click directly into columns J and K to edit the information.

Easily Manage and Edit Filtered Tables in WPS Spreadsheet
WPS Spreadsheet provides powerful data management tools, including advanced filtering, custom views, and VBA support, enabling you to search and edit large datasets seamlessly.
- 1. Open your dataset: Launch WPS Spreadsheet and open your data file.
- 2. Apply AutoFilter: Select your table headers, navigate to the Data tab, and click the 'AutoFilter' button.
- 3. Search for records: Click the dropdown arrow on the name column header and type the name into the search box to filter the rows.
- 4. Edit directly: Click directly into the visible cells in columns J and K to update the information, which will save to the original dataset.

Frequently Asked Questions
Why can't I edit filtered results in a standard Excel formula extraction?
If your filtered results are generated by formulas like FILTER or VLOOKUP, they are dynamic arrays or lookup results, not the original cells. To edit the data, you must filter the source table in place or use VBA.
How do I save a workbook that contains VBA macros?
Go to File > Save As, and change the 'Save as type' to 'Excel Macro-Enabled Workbook (*.xlsm)'. If you save it as a standard .xlsx file, the VBA code will be permanently deleted.
Is there a way to edit filtered data without using VBA?
Yes. You can use the built-in AutoFilter feature on the Data tab. By applying a text filter directly to the name column of your source table, you can hide non-matching rows and safely edit the visible cells in columns J and K.




