Data Import & Export

Split CSV Values into Separate Excel Rows

Natalie TaylorNatalie Taylor Dec 2, 2026 868 views

Question details

Separate comma-delimited quantities and prices into aligned rows and calculate line-item expenses.

Split CSV Values into Separate Excel Rows
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.
Before you start

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.

Solution 1Recommended

Split and calculate line items with Excel dynamic array formulas

Use this method in an Excel version that supports TEXTSPLIT and spilled arrays.

1
Split the quantities

In H10, enter =--TEXTSPLIT(H7,,",") to split the quantities into rows and convert them to numbers.

2
Split the prices

In I10, enter =--TEXTSPLIT(I7,,",") to split the corresponding prices into rows.

3
Calculate each expense

In J10, enter =H10#*I10# to multiply each quantity by its corresponding price and spill the results down the column.

4
Calculate the total

In an empty cell outside the spill areas, enter =SUM(J10#) to add the line-item expenses.

Split and calculate line items with Excel dynamic array formulas
Check the source values: The quantity and price lists must have matching lengths and contain valid numbers. Quoted CSV fields containing commas need a CSV-aware import rather than a simple comma split.
WPS Spreadsheets

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. 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. 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. 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. 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.
Separate quantity and price lists into aligned line-item rowsCalculate expenses with spreadsheet formulasOpen and save Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface
QA img-9

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.