Link to home
Create AccountLog in
Avatar of Rrave26
Rrave26

asked on

VBA Question

I got help in getting a data cleaning script written to help remove unwanted spaces and characters in my source data.  It works pretty well but I have noticed that it has missed catching some blank spaces. Any idea on why?
Prouduction-IM-METRICS-T-V01.5.xlsm
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

They might be 'non-breaking spaces'. Just taking a look now at your sample file.
Please identify an example cell that has the problem.

To remove non-breaking spaces you could modify the "=TRIM" line in your CleanData macro
WS.Range("ZZ1:ZZ" & MaxRow).Formula = "=TRIM(SUBSTITUTE(" & Left(rCol.Address, InStr(1, rCol.Address, ":") - 1) & "1,CHAR(160),CHAR(32)))"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Rrave26
Rrave26

ASKER

I will try that today Martin, and get back to you with the results.
Avatar of Rrave26

ASKER

I agree. Martin.  Thanks for the help.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.