Title: Replicate Excel's TRIM Function In Power Query | How To Excel
Headings: Replicate Excel’s TRIM Function In Power Query
Replicate Excel’s TRIM Function In Power Query
Table of Contents
The Problem
Video Tutorial
M Code For The Query Function
Create A Blank Query
Add M Code To The Advanced Editor
Using The Query Function
Conclusions

Content: No spaces between words are removed. My solution in the post was to apply the Trim command then use the Replace Values command to replace instances of double spaces with single spaces. Then repeat the process until there are no more double spaces. Not a great solution to be honest. It means repeating a step which takes a bit more effort. But more importantly, if new data comes in then the number of Replace Values steps might not be sufficient anymore. So we’re going to create a power query function to replicate Excel’s superior TRIM function. Video Tutorial
YouTube
How To Excel
43.7K subscribers
Subscribe
Replicate Excel TRIM Function In Power Query
Watch later
Copy link
Info
Shopping
Tap to unmute
If playback doesn't begin shortly, try restarting your device. You're signed out
Videos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.