VBA & Macro Problems

How to Sum Excel Cells with No Fill Color in WPS Spreadsheets Using VBA or a Helper Column

John WilsonJohn Wilson Nov 13, 2026 870 views

Question details

WPS Spreadsheets users need to total values in Excel cells that have no fill color because a standard SUMIF formula cannot test cell formatting directly.

How to Sum Excel Cells with No Fill Color in WPS Spreadsheets Using VBA or a Helper Column
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user is managing a status or payment tracking sheet and needs a reliable sum for uncolored cells, either by adding a helper column or by evaluating fill color with VBA.
Observed behavior
A normal SUMIF formula cannot see cell fill color, so totals that depend on highlighting return an incorrect or unavailable result; a helper column or VBA User Defined Function is needed.
Before you start

Decide whether your worksheet already has a status or paid/unpaid column. If you must test actual fill color, make sure you can save the workbook as a macro-enabled .xlsm file in WPS Spreadsheets.

Solution 1Recommended

Use a Helper Column and the SUMIF Formula

Best for maintainable workbooks: mark rows as paid or uncolored in an extra column and let SUMIF total the matching amounts.

This method avoids VBA and is easier to audit. You can enter any consistent marker such as x, 1, or Paid in the helper column, then sum only the rows where the marker is present.

1
Add a helper column

Open the workbook in WPS Spreadsheets, click a column letter next to your amounts, right-click and choose Insert to add a blank column.

2
Mark the paid or uncolored rows

Type x, 1, or another consistent marker in the helper column for each row whose amount should be included in the total.

3
Enter the SUMIF formula

Select the cell where the total should appear, type =SUMIF(paid_range,"x",amount_range), and press Enter. For example, using C2:C20 as markers and B2:B20 as amounts: =SUMIF(C2:C20,"x",B2:B20).

Use a Helper Column and the SUMIF Formula
Why this is recommended: The workbook stays easy to edit and does not depend on VBA. You can filter or sort the marker column without affecting the result.

Sum Uncolored Excel Cells in WPS Spreadsheets

Use WPS Spreadsheets to sum cells with no fill color with a helper column and SUMIF, or apply a VBA User Defined Function for color-based totals. WPS opens and saves Excel .xlsx and .xlsm files, so your formulas and macros keep working.

  1. 1. Download and install WPS Office: Go to the WPS Office download page, install WPS Spreadsheets, and launch the application.
  2. 2. Open your Excel workbook: Click File > Open, select the .xlsx or .xlsm file, and enable editing if prompted.
  3. 3. Apply the helper column or VBA solution: Use the SUMIF helper column method for a maintainable total, or open the VBA editor with Alt+F11 and insert the SumUncolored function for color-based summing.
  4. 4. Save and recalculate: Save the file in a compatible format such as .xlsx or .xlsm, then press F9 after changing fill colors to refresh any VBA result.
Works with Excel .xlsx and macro-enabled .xlsm files without reformattingUses the same SUMIF and VBA approach as Excel, so you can migrate existing workbooks easilyFree and lightweight spreadsheet editor for accounting and status-tracking sheetsFamiliar Office-style interface and formula editing
microsoft office alternative - wps office

Frequently Asked Questions

Can WPS Spreadsheets use the same SUMIF formula as Excel to sum with a helper column?

Yes. Select the result cell, enter =SUMIF(paid_range,"x",amount_range), and press Enter. WPS Spreadsheets uses the same formula syntax as Excel.

Will the VBA function work if I save the workbook as a normal .xlsx file?

No. Macro-enabled VBA code is stored only in .xlsm workbooks. In WPS Spreadsheets, use File > Save As and choose Excel Macro-Enabled Workbook (*.xlsm).

Why does the total not change when I recolor a cell?

Changing fill color does not always trigger calculation. Press F9 to recalculate, or use Application.Volatile in the VBA function to mark it for recalculation.

Can I sum only colored cells instead of no-fill cells with this function?

Yes. Modify the VBA condition to check a specific Interior.Color or ColorIndex instead of xlColorIndexNone, then use the same function.