rows.com

Transform messy delimited data into clean, structured rows with ease

Are legacy spreadsheets holding you back from effortlessly managing your data?

2 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

There is a better way to handle messy delimited data, and it does not require a dozen helper columns or a macro. Greg Hullender's walkthrough proves that a single `LET`-based formula can transform a jumble of values and comma-separated strings into clean, structured rows, and it does so with an elegance that deserves attention.

The core insight is that Excel's `TEXTSPLIT` function, while useful, fails when applied to a column of strings because it cannot predict the output width without scanning every row first. Hullender solves this by first counting commas with `REGEXREPLACE` and `LEN`, then building a row vector that matches the widest possible split. From there, `TEXTBEFORE` and `TEXTAFTER` extract each substring, and a cleverly "stupid" `IF` statement floods the associated values into the same shape as the split results. The final `HSTACK` and `TOCOL` calls strip errors and align everything perfectly. What looks like a wall of nested functions is actually a precise, repeatable engine for a task that has frustrated spreadsheet users for years.

For anyone who regularly imports logs, exports from legacy systems, or wrangles survey data, this approach matters. It turns a manual, error-prone chore into a single formula that spills the entire output. The practical implications are immediate: less time spent dragging formulas down rows, fewer mistakes from mismatched arrays, and a result that updates automatically when source data changes. The formula is also adaptable, changing the delimiter requires edits at only three points, and handling multi-character delimiters or trimming whitespace is straightforward.

We appreciate that Hullender does not pretend the solution is perfect. He flags a bug where `TEXTAFTER` returns a `#VALUE` error for empty strings, and offers a workaround. That honesty reflects the kind of spreadsheet thinking we value: solve the problem, show the reasoning, and acknowledge the edges. If you have ever stared at a column of "a,b,c" and wished for a cleaner path to the rows beneath it, this formula is worth copying into your own workbook today.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Fairly often someone tells us they have a combination of values and delimited strings, and they want to split up the strings but keep the values. That is, they have something like this:

https://preview.redd.it/yxpr6ijjfxig1.png?width=273&format=png&auto=webp&s=ce56eae127fd88e24239d89fb34d0ee5527a2b47

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community