rows.com

Unpivot complex spreadsheets without Power Query using flexible Lambda functions

Navigating the complexities of data transformation can be frustrating, especially when dealing with merged cells and the limitations of traditional tools.

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

The Lambda functions that user Medohh2120 shared solve a real problem without pretending to reinvent the wheel. That is exactly the kind of practical innovation we need more of. Unpivoting wide spreadsheets into long, database-ready formats is a task that stops countless people cold, forcing them to either learn Power Query or manually restructure data row by row. This solution cuts through that friction with a single formula that handles merged cells, multiple header rows, and even error padding.

What makes this approach worth attention is its honesty about defaults. The function comes with sensible assumptions: one fixed column for identifiers, one header row, and blanks removed by default. Most users will only need five arguments to get their data into shape. The optional parameters exist for edge cases, not to overwhelm. That design philosophy respects the user's time and skill level. It does not demand that you become an Excel power user overnight. It meets you where you are and lets you scale up when you need to.

The SPLIT_INJECT helper is a smart companion. Instead of forcing you to unpivot everything, it lets you target specific columns for splitting while keeping the rest of the table stable. That kind of modularity is rare in spreadsheet tools, which tend to treat transformations as all-or-nothing operations. By giving users control over which columns expand and which stay put, the function acknowledges that real data work is rarely clean or uniform. Sometimes you just need to split one column without breaking the whole layout.

This is not about replacing Power Query. It is about giving people a faster, lighter option for the moments when opening a separate tool feels like overkill. Medohh2120 has shared the code openly on GitHub, inviting adaptation and critique. That openness is the real value. The functions are not locked behind a product or a paywall. They are yours to test, break, and improve. If you have ever stared at a wide table and wished for a simpler path to a clean dataset, grab the Gist and try it on your own messy spreadsheets. The only way to know if it works for you is to run it.

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

I’ve been working on a set of functional Excel Lambdas to solve a common headache: transforming "Wide" human-readable data into "Long" database formats without having to open Power Query every time.

Don’t worry about the full list, most use cases only require 5 arguments. I've included a table of default values at the end.

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