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

How do you handle messy data with inconsistent spaces across hundreds of columns?

I just got handed a spreadsheet with over 300 columns and the data is a complete mess. Every single entry has a leading space before the actual text. Not trailing spaces just a space at the start of each cell. Someone apparently copy pasted from somewhere without trimming and now I have to clean this up for a report due Friday.

I know about the TRIM function but manually applying it to 300 columns one by one is going to take forever. I tried using find and replace with a space and replace with nothing but that also removes spaces between words which I need to keep. So thats not going to work.

Power Query seems like the obvious answer here but Im curious how others would approach this. If I load the whole table into Power Query I can select all columns and do a trim transform in one go which feels way faster. But I rarely work with this many columns and Im wondering if theres any performance downside or gotchas I should watch out for.

Also open to VBA solutions if anyone has a macro for this. Just trying to figure out the most efficient way before I commit to a method. Curious how the pros handle massive cleanup jobs like this.

submitted by /u/paintarose
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#generative AI for data analysis
#financial modeling with spreadsheets
#natural language processing for spreadsheets
#big data performance
#data cleaning solutions
#enterprise-level spreadsheet solutions
#AI-driven spreadsheet solutions
#no-code spreadsheet solutions
#big data management in spreadsheets
#conversational data analysis
#rows.com
#real-time data collaboration
#intelligent data visualization
#data visualization tools
#enterprise data management
#data analysis tools
#modern spreadsheet innovations
#machine learning in spreadsheet applications
#digital transformation in spreadsheet software