Calculation Issues

How to Calculate Six-Month Paid Totals by ID in Excel

Camila MilosovichCamila Milosovich Nov 13, 2026 868 views

Question details

Calculate total paid amounts for records matching a specific ID and a six-month prior or post-initial period indicator.

How to Calculate Six-Month Paid Totals by ID in Excel
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
The user has a table with ID, paid amount, and indicator columns for records falling within six months before or after an initial date, and needs totals by ID.
Observed behavior
The user needs a formula-based result instead of manually filtering and summing rows; the table already contains separate indicator columns for prior and post-initial periods.
Before you start

Make sure your data is in an Excel Table such as Table1 and contains columns for ID, Paid, 6m prior to Initial, and 6m after Initial. In WPS Office Spreadsheets, confirm that the FILTER function is available, or use the SUMPRODUCT alternative for older versions.

Solution 1Recommended

Use SUM and FILTER to Total Six-Month Paid Amounts by ID

Best for Excel 2021, Microsoft 365, and WPS Office versions that support dynamic array functions; it calculates prior or post six-month totals in one formula.

The FILTER function returns all Paid rows where the ID equals the lookup ID and the period indicator equals 1. SUM then adds those returned values.

1
Select the result cell

Click the cell where you want the prior six-month total, such as K2.

2
Enter the prior six-month formula

Type =SUM(FILTER(Table1[Paid],(Table1[ID]=J2)*(Table1[6m prior to Initial]=1),0)) and press Enter.

3
Enter the post-initial formula

In the next cell, type =SUM(FILTER(Table1[Paid],(Table1[ID]=J2)*(Table1[6m after Initial]=1),0)) and press Enter.

4
Copy the formulas for other IDs

Select both result cells and drag the fill handle down or press Ctrl+D to copy the formulas for each ID in column J.

Use SUM and FILTER to Total Six-Month Paid Amounts by ID
Expected results: With indicator columns set to 1 for applicable records, ID 1 can return $695 and ID 2 can return $110.
WPS Spreadsheets formula

Calculate Six-Month Paid Totals by ID with WPS Office Spreadsheets

Open your workbook in WPS Office Spreadsheets and use the same SUM and FILTER or SUMPRODUCT formulas to total paid amounts by ID and period indicator. WPS keeps Excel formula compatibility, so your table names, columns, and calculations continue to work without changing your workflow.

  1. 1. Open the workbook in WPS Office Spreadsheets: Launch WPS Office, click Menu > Open, and select the .xlsx workbook containing Table1.
  2. 2. Confirm the table and columns: Click any cell in the table and check the Table Tools tab to verify the table name and column headers.
  3. 3. Enter the SUM and FILTER formula: In the result cell, enter =SUM(FILTER(Table1[Paid],(Table1[ID]=J2)*(Table1[6m prior to Initial]=1),0)) and press Enter.
  4. 4. Create the post-initial total: In the next cell, enter the same formula using Table1[6m after Initial] instead of the prior-period column.
  5. 5. Copy the formulas down: Select both formula cells and use the fill handle to copy them down for all IDs.
Supports SUM, FILTER, and SUMPRODUCT formulas for six-month totals by IDOpens and saves .xlsx Excel workbooks with formulas and table namesFree, lightweight spreadsheet editor with a familiar Excel-style ribbonLets you calculate, edit, and share period totals without switching applications
microsoft office alternative - wps office

Frequently Asked Questions

Does this formula work if my data is not in a named Excel table?

Yes. Replace structured references such as Table1[Paid] and Table1[ID] with normal ranges like $C$2:$C$100 and $A$2:$A$100, and lock the lookup cell with $J$2 if you copy the formula.

What should the prior and after indicator columns contain?

They should contain 1 for rows that fall within the applicable six-month period and 0 or blank for other rows. The formula multiplies by the indicator so only matching period rows are included.

Why does my FILTER formula return #NAME? or #CALC!?

#NAME? means the FILTER function is not available in your version, so use the SUMPRODUCT alternative or update WPS Office. #CALC! means no rows match the criteria; the third argument 0 in FILTER returns 0 in that case.

Can I calculate six-month totals without indicator columns?

Yes. You can add date conditions directly in the formula, for example using EDATE to define the six-month range from the initial date. Indicator columns are simpler when the period flags already exist in the table.