rows.com

Clean messy location data in Power Query without touching your source.

If you're handling a dataset with inconsistent formatting in Power Query, you can easily transform entries to achieve uniformity.

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

There's a quiet elegance in a question like the one /u/beerguy74 brings to the table. It's not about building a flashy dashboard or training a model. It's about cleaning 1,700 rows of location data, five of which have decided to live by their own rules. The source file is untouchable. The formatting is inconsistent. And yet, the answer isn't to throw up your hands or start a ticket with a data team that may never reply. The answer is already sitting inside Power Query, waiting to be used.

What we appreciate here is the refusal to accept the mess as inevitable. The user isn't asking for a miracle. They're asking for a method. And that's the mindset that separates people who merely use spreadsheets from those who make them work. The problem is specific: a venue field that sometimes contains the city and state mashed together, a city field left blank, and a state column that's always correct. The fix involves splitting that venue column on the comma, using the second part to fill in the blank city, and then trimming away the extra state code that's now duplicated. It's a few steps. It's entirely doable. And it turns a manual, error-prone chore into a repeatable transformation.

What's striking is how small the gap is between the messy data and the clean data. We're not talking about missing values or wild inconsistencies. We're talking about five rows where a comma and a bit of carelessness created a small crack in an otherwise solid dataset. Most people would look at that and think, "I'll just fix those by hand." And they'd be right, until next month, when the same file comes in with the same issue, and they fix it again. Power Query doesn't just solve the problem once. It encodes the solution so that the next time the source file arrives, the transformation happens automatically. That's the real win. Not the cleanup itself, but the fact that the cleanup becomes part of the workflow.

So here's what we'd say to anyone staring at a similar spreadsheet: stop treating Power Query like a last resort and start treating it like your first instinct. You don't need to be a data engineer to split a column by delimiter, trim whitespace, or use a conditional column. You need to be curious enough to click around, patient enough to preview your steps, and confident enough to know that a little structure beats a lot of manual effort every time. The user's question is proof that you don't need perfect data to start. You just need a way to make it better, and then the discipline to let the tool do the heavy lifting. That's not a technical skill. That's a mindset. And it's one worth adopting.

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

I have three columns that are venue, city and state so it might read:

Venue – Simpsons; City – Springfield; State – XX (proper format)

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