Cleaning Data

Faulks

New Member
Joined
Sep 15, 2008
Messages
21
Hi All,

I am trying to automate the processing of data to a spreadsheet. I am copy and pasting the information into the spreadsheet and trying to write some vba to process it. The issue i have is that a lot of the data looks like it has trailing blanks (but there not!!!). I have used Trim and Clean but the data does not change, i have coded it correctly because i have used some sample data with trailing blanks and the code sorts it but it does nothing to the pasted data - any advice???

Thanks
Faulks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Faulks

New Member
Joined
Sep 15, 2008
Messages
21
Thanks Peter, that almost worked like a dream. However it has still left 1 'space thingy' at the beginning of the data - any ideas what this could be, it's not a space as i've tried the Trim and Clean again and it's still there?

Thanks again
Faulks
 

SteveO59L

Well-known Member
Joined
Apr 21, 2004
Messages
7,899
Try something like =code(left(a1,1)) to identify which character it is
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,651
Messages
5,854,959
Members
431,689
Latest member
jacker01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top