Power Query Problems

How to Merge Incorrectly Split Excel Columns with Delimiters

Kushani NimanthikaKushani Nimanthika Oct 22, 2026 869 views

Question details

The user needs to correct inconsistent comma-splitting in daily reports that shifts values into wrong columns, particularly when files are combined.

How to Merge Incorrectly Split Excel Columns in Specific Rows
Product
Microsoft Excel
Device & OS
not provided
Scenario
Cleaning up and combining daily report files where data was incorrectly split by delimiters across varying columns and rows.
Observed behavior
Data values shift into incorrect adjacent columns because of inconsistent comma delimiters in the source data, causing misalignment.
Before you start

Identify the specific delimiter causing the split (e.g., a comma) and back up your original daily reports before applying bulk transformations or VBA macros.

Solution 1Recommended

Use Dynamic Array Formulas to Rebuild the Row

Ideal for rows where the incorrect split follows a predictable pattern, allowing you to conditionally merge and split the text.

If only specific rows have an extra column due to an improper split (e.g., a comma inside a number), you can use TEXTJOIN and TEXTSPLIT to rebuild the row dynamically.

1
Identify the shifted columns

Check which columns contain the improperly split values (for example, columns D and E).

2
Enter the combination formula

In a new blank column next to your data, enter a formula that checks for the shift. For example: `=TEXTSPLIT(IF(H2<>"",TEXTJOIN(",",,A2:C2,D2&E2,F2:H2),TEXTJOIN(",",,A2:G2)),",")`. This checks if column H has data (indicating a shift), joins D and E together, and then splits the row back into proper columns.

3
Apply to all rows

Drag the fill handle down to apply this correction formula to all rows in your daily report.

4
Paste as values

Copy the newly generated array, right-click the original data range, and select 'Paste as Values' to overwrite the broken data with the corrected layout.

Use Dynamic Array Formulas to Rebuild the Row
Formula variations: If you do not have TEXTSPLIT, you can simply use the TEXTJOIN portion: `=IF(H2<>"",TEXTJOIN(",",,A2:C2,D2&E2,F2:H2),TEXTJOIN(",",,A2:G2))` and then use the 'Text to Columns' feature to split them manually.
Process Data Easily in WPS Spreadsheet

Clean and Merge Inconsistent Data with WPS Spreadsheet

WPS Spreadsheet provides robust support for dynamic array formulas and advanced macro functionalities, empowering you to quickly fix irregularly split columns in large reports without hassle.

  1. 1. Open your report: Launch WPS Spreadsheet and open the daily report file containing the incorrectly split data.
  2. 2. Set up the correction column: Select an empty cell next to your main data table to prepare for data transformation.
  3. 3. Apply formulas or VBA: Use the built-in TEXTJOIN dynamic array formula or a custom VBA UDF to re-merge the split cells automatically.
  4. 4. Finalize the cleanup: Copy the corrected output and paste it over the original data as values to permanently fix the layout.
Seamless compatibility with Microsoft Excel formulas like TEXTJOIN.Supports advanced VBA/Macros for custom data cleanup tasks.Lightweight, fast, and handles large daily reports smoothly.Free built-in data processing with a familiar interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my numbers split into different columns when importing reports?

This usually happens when the source data uses a delimiter (like a comma) inside numbers (e.g., 1,000) but lacks text qualifiers like quotation marks. The software reads the comma as a column break instead of a thousands separator.

How can I combine cells only if they contain numbers?

You can write a custom VBA function that loops through the range, checks if `IsNumeric(cell.Value)` is true for adjacent cells, and concatenates them if the condition is met.

What if the incorrectly split columns change rows dynamically?

Using an IF statement combined with TEXTJOIN allows you to test for a condition (e.g., checking if the last column is empty). If the row is shifted, it triggers the combination logic; otherwise, it leaves the row as is.