Function Problems

How to Concatenate Child-Row Values into Parent Rows in Excel

Algirdas JasaitisAlgirdas Jasaitis Nov 11, 2026 869 views

Question details

The user needs to group parent and child records together and combine multiple child-row values into a single parent row.

How to Concatenate Child-Row Values into Parent Rows in Excel
Product
Excel
Device & OS
not provided
Scenario
Organizing hierarchical data where child components and quantities must be systematically merged into their respective parent item rows.
Observed behavior
Parent and child records currently exist in separate rows, and the goal is to flatten the child data into the parent records using automated formulas.
Before you start

Ensure you are using a version of Excel that supports dynamic array functions (such as Microsoft 365 or Excel 2021), as functions like LET, UNIQUE, and VSTACK are required for the formula-based solution.

Solution 1Recommended

Use Advanced Dynamic Array Functions

Create a dynamic, automated solution using a combination of LET, UNIQUE, FILTER, REDUCE, and TEXTJOIN to group and concatenate child rows.

This approach uses the LET function to define variables, making complex formulas easier to read and process. By combining UNIQUE to find parent groups and FILTER with TEXTJOIN, you can aggregate child data seamlessly.

1
Identify Parent Groups

Use the UNIQUE function on your parent ID column to extract a distinct, deduplicated list of parent records.

2
Filter Child Records

Apply the FILTER function to isolate child records that match each unique parent ID.

3
Concatenate the Values

Wrap the FILTER function inside TEXTJOIN to combine the child components and quantities into a single text string, separated by commas or line breaks.

4
Build the Final Array

Use REDUCE, VSTACK, and HSTACK to iterate through the parent groups and output the combined parent and concatenated child arrays dynamically into your worksheet.

Use Advanced Dynamic Array Functions
Formula Complexity: Because this formula combines multiple advanced array functions, test it on a small sample of your parent-child dataset first to ensure the array dimensions align correctly.
Efficient Spreadsheet Management

Manage Complex Data Hierarchies with WPS Spreadsheet

WPS Spreadsheet provides comprehensive support for advanced data processing, allowing you to seamlessly manage parent-child records, utilize advanced functions, and organize your datasets effectively.

  1. 1. Open your Dataset in WPS: Launch WPS Spreadsheet and open your .xlsx file containing the parent and child records.
  2. 2. Apply Array Formulas: Select your target cell and input your combination of array functions (like UNIQUE, FILTER, and TEXTJOIN) to group and concatenate the data.
  3. 3. Format the Output: Use the Home tab to adjust text wrapping and cell dimensions so the concatenated child rows are easy to read and manage.
Fully compatible with Microsoft Excel formulas and file formats (.xlsx).Supports advanced array formulas and data processing tools for complex data manipulation.Lightweight installation with an intuitive, tabbed interface.Free to use for daily spreadsheet tasks and data analysis.
microsoft office alternative - wps office

Frequently Asked Questions

Why is the TEXTJOIN function returning an error when combining child rows?

This usually happens if the range provided to TEXTJOIN contains errors or if the array generated by the FILTER function returns empty. Ensure your FILTER criteria correctly match the parent IDs and handle empty arrays using the if_empty argument in the FILTER function.

Can I concatenate child rows without using complex array functions?

Yes, you can use Power Query to group rows and extract values visually, or you can write a VBA macro to loop through the records and concatenate the child rows into the parent rows automatically.

Are dynamic array functions like VSTACK and HSTACK available in older Excel versions?

No, functions like VSTACK, HSTACK, and LET are only available in Microsoft 365 and Excel 2021 or newer. For older versions of Excel, consider using Power Query or VBA scripts as an alternative solution.

How do I separate the concatenated values with a line break?

In the TEXTJOIN function, use CHAR(10) as the delimiter argument (e.g., TEXTJOIN(CHAR(10), TRUE, range)). After applying the formula, ensure you have enabled 'Wrap Text' on the destination cells so the line breaks display correctly.