VBA & Macro Problems

How to Filter Excel Cells That Contain Notes Using Office Scripts and WPS Office

Steve KSteve K Nov 13, 2026 869 views

Question details

The user wants to filter Excel rows or cells that contain notes and asks whether Excel for the web and Office Scripts can provide a script-based alternative to VBA.

How to Filter Excel Cells That Contain Notes Using Office Scripts and WPS Office
Product
Microsoft Excel for the web / Office Scripts
Device & OS
not provided
Scenario
The user is working with a workbook that contains cell notes and needs to filter so only annotated cells or rows are visible.
Observed behavior
Excel for the web does not provide a built-in note filter, and Office Scripts do not expose a dedicated note-based AutoFilter criterion; a helper-column workaround is required.
Before you start

Before you start, save the workbook in a format that supports notes and make sure the Developer or Automate tab is available. If you plan to run a macro or script, confirm that script or macro execution is allowed for the file.

Solution 1Recommended

Use an Office Script helper column to mark cells that contain notes and then filter that column

Use this when you are working in Excel for the web and need a scripted workaround because no native notes filter exists.

Office Scripts can loop through a range and read cell notes, but they cannot apply a dedicated notes filter. Creating a TRUE/FALSE helper column makes the result filterable with the standard AutoFilter.

1
Open the Automate tab and create a script

In Excel for the web, open your workbook, select the Automate tab, and click New Script to open the Code Editor.

2
Write a note-checking script

In the script editor, write code that gets the used range, checks each cell's notes with getNotes(), and writes TRUE or FALSE to a helper column.

3
Run the script

Click Run to populate the helper column, then verify that cells with notes are marked TRUE and other cells are marked FALSE.

4
Filter the helper column

Select the header row, click Data > Filter, open the filter dropdown on the helper column, and select TRUE to display only the marked rows.

Use an Office Script helper column to mark cells that contain notes and then filter that column
No native notes filter in Excel for the web: Excel for the web does not offer a built-in AutoFilter criterion for notes or comments, so the helper-column approach is the standard workaround.
WPS Spreadsheets VBA alternative

Filter Cells with Notes in WPS Spreadsheets

Use WPS Spreadsheets and a small VBA-style macro with AutoFilter to identify and show only cells that contain notes. This gives you a desktop alternative to Excel for the web and Office Scripts.

  1. 1. Open the workbook in WPS Spreadsheets: Launch WPS Office, open the workbook that contains the notes, and click the Developer tab.
  2. 2. Create a helper-column macro: Click Visual Basic Editor, insert a module, and add a macro that checks each cell in the selected range for notes or comments and writes TRUE or FALSE to the adjacent helper column.
  3. 3. Run the macro: Press F5 or click Run in the editor to execute the macro, and save the workbook as a macro-enabled file if prompted.
  4. 4. Filter the helper column: Return to the spreadsheet, select the header row, click Data > AutoFilter, and choose TRUE from the helper column dropdown to display only cells with notes.
Free desktop tool for note-based filteringUses a familiar ribbon with AutoFilter and Developer toolsOpens and saves Microsoft Excel .xlsx and .xlsm filesNo browser or Office Scripts dependencyLightweight and easy to use
microsoft office alternative - wps office

Frequently Asked Questions

Can Excel for the web filter cells that contain notes using the built-in filter?

No. Excel for the web does not have a built-in AutoFilter criterion for notes or comments. You can use an Office Script or manual helper column to mark cells with notes and then filter that column.

Does Office Scripts have a special AutoFilter criterion for notes?

No. Office Scripts do not currently expose a dedicated note-based AutoFilter criterion. The common pattern is to loop through cells, detect notes, and write TRUE or FALSE to a helper column.

Can I use WPS Office to filter cells that contain notes?

Yes. In WPS Spreadsheets, you can create a VBA-style macro that detects notes or comments and marks them in a helper column, then use AutoFilter to display only the marked cells.

What is the difference between notes and comments when writing a macro?

Legacy comments and newer threaded notes may be stored differently. In VBA you may need to use the Comments or Notes property depending on the workbook version, while Office Scripts uses getNotes().

Do I need Excel desktop to run the Office Script workaround?

No. Office Scripts run in Excel for the web, but the workbook must be stored in SharePoint or OneDrive and opened in a compatible browser.