Function Problems

Use Excel TEXTJOIN, UNIQUE, and FILTER to Return Groups by Yearly Values

Steve KSteve K Nov 18, 2026 869 views

Question details

Return a joined list of unique groups with a matching type and a positive total from Year 2 onward.

Return Unique Groups by Yearly Values in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The worksheet lists groups in column A, types in column B, and Year 2 through Year 4 values in columns E through G.
Observed behavior
The desired result is B / C, excluding Group A because its CAR row has no values after Year 1.
Before you start

Check that A2:A7 contains group names, B2:B7 contains types, and E2:G7 contains numeric values for Year 2 through Year 4. This formula requires an Excel version that supports FILTER, UNIQUE, and TEXTJOIN.

Solution 1Recommended

Filter and Join Unique Groups with a Positive Yearly Total

Use a dynamic array formula to find CAR rows with positive Year 2 through Year 4 totals and join their unique group names.

1
Select an output cell

Click an empty cell where you want the group list to appear.

2
Enter the formula

Type =TEXTJOIN(" / ",TRUE,UNIQUE(FILTER(A2:A7,(B2:B7="CAR")*((E2:E7+F2:F7+G2:G7)>0),""))) and press Enter.

3
Check the result

Confirm that the cell displays B / C for the described data. Adjust A2:A7, B2:B7, and E2:G7 to match your worksheet, keeping the ranges aligned.

Filter and Join Unique Groups with a Positive Yearly Total
How the total is evaluated: The formula tests the Year 2 through Year 4 total for each CAR row, not the combined total across all rows belonging to a group. If no rows match, it returns a blank result.
WPS Spreadsheet

Find and Join Matching Groups in WPS Spreadsheet

Open your workbook in WPS Spreadsheet and use the same formula to filter CAR rows, remove duplicate groups, and join the results. Your WPS version must support FILTER, UNIQUE, and TEXTJOIN.

  1. 1. Open the workbook: In WPS Spreadsheet, select Open and choose your Excel workbook.
  2. 2. Check the columns: Confirm that group names are in A2:A7, types are in B2:B7, and Year 2 through Year 4 values are in E2:G7.
  3. 3. Enter the formula: Click an empty cell and enter =TEXTJOIN(" / ",TRUE,UNIQUE(FILTER(A2:A7,(B2:B7="CAR")*((E2:E7+F2:F7+G2:G7)>0),""))).
  4. 4. Review and save: Press Enter, check the result, and use File > Save As to save the workbook in XLSX format.
Filter groups by type and positive yearly row totalsOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interfaceJoin matching group names into one cell
microsoft office alternative - wps office

Frequently Asked Questions

Why is Group A excluded?

Its CAR row has no values after Year 1, so its Year 2 through Year 4 total is not greater than zero.

How can I filter for a different type?

Replace "CAR" in the B2:B7="CAR" condition with the type you want, such as "TRUCK".

What happens if no rows meet the conditions?

The formula uses an empty string as FILTER's if_empty argument, so TEXTJOIN returns a blank result.

Does the formula add values across multiple rows for the same group?

No. It tests each row's Year 2 through Year 4 total separately, then returns each matching group name once.

Why does the formula return a function error?

Check that your spreadsheet version supports FILTER, UNIQUE, and TEXTJOIN, and that the Year 2 through Year 4 cells contain numbers or blanks rather than text.