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
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

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,896
Try something like =code(left(a1,1)) to identify which character it is
 

Watch MrExcel Video

Forum statistics

Threads
1,122,608
Messages
5,597,143
Members
414,129
Latest member
mr vba

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