Split CSV Values into Separate Excel Rows
Question details
Separate comma-delimited quantities and prices into aligned rows and calculate line-item expenses.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Quantity and price lists are stored in individual cells and need to be expanded into rows for expense calculations.
- Observed behavior
- Multiple comma-separated values appear in a single cell instead of separate line-item rows.
Identify the cells containing the quantity and price lists, and confirm that both lists have the same number of values in the same order. The examples use quantities in H7 and prices in I7; leave the output area starting at H10 and I10 empty.
Split and calculate line items with Excel dynamic array formulas
Use this method in an Excel version that supports TEXTSPLIT and spilled arrays.
In H10, enter =--TEXTSPLIT(H7,,",") to split the quantities into rows and convert them to numbers.
In I10, enter =--TEXTSPLIT(I7,,",") to split the corresponding prices into rows.
In J10, enter =H10#*I10# to multiply each quantity by its corresponding price and spill the results down the column.
In an empty cell outside the spill areas, enter =SUM(J10#) to add the line-item expenses.

Split values with Excel Text to Columns and transpose them
Use this manual method when TEXTSPLIT is unavailable.
Split comma-separated values into rows in WPS Spreadsheets
Use Text to Columns and Paste Special in WPS Spreadsheets to arrange quantities and prices in rows, then calculate each expense with a formula.
- 1. Copy the source lists: Open the workbook in WPS Spreadsheets and copy the quantity and price cells to separate blank staging rows, such as A1 and A2.
- 2. Split each staging row: Select A1 and choose Data > Text to Columns. Select the comma delimiter and complete the wizard, then repeat for A2.
- 3. Arrange values in columns: Copy the populated cells from the quantity staging row and use Paste Special > Transpose at H10. Repeat with the price staging row at I10.
- 4. Calculate the expenses: Enter =H10*I10 in J10 and fill the formula down. In an empty cell, use SUM over the resulting expense range to calculate the total.

Frequently Asked Questions
How do I split comma-separated values into rows in Excel 365?
If the list is in H7, enter =TEXTSPLIT(H7,,",") in an empty cell. The values spill vertically into the cells below.
Why does the formula return a spill error?
Check the cells below the formula for existing content and clear the intended output area. Spilled formulas also need to be entered outside an Excel table.
How can I calculate a total from separate quantity and price lists?
After splitting matching numeric lists into H10 and I10, enter =SUM(H10#*I10#) in an empty cell. Each quantity is multiplied by the price in the corresponding position.
Can I split the lists without a dynamic array formula?
Yes. Use Data > Text to Columns with the comma delimiter, then copy the resulting cells and use Paste Special > Transpose to arrange them vertically.
What if a CSV field contains a comma inside quotation marks?
A simple comma split can break that field incorrectly. Import the CSV with a CSV-aware tool, such as Excel's Data > From Text/CSV, and check its delimiter and quoting settings.




