Trimming Blanks using VB

craig80

Board Regular
Joined
May 18, 2010
Messages
51
Hi All,

I have a data set of about 20k rows, exported from a not so friendly DB, that has blanks all over. It is causing havoc with my VB and Dates!

Can anyone help me to TRIM all the data.

Ideally some VB just to pop into the clean up loop I have on for formatting.

Any advice would be great.

Thanks

Craig
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I have had a bash with this, some of the VB removes the space by specifying it as a CHR(160).

But it loops round forever, and isn't as pratical as I had hoped.

I am looking to transpose =TRIM(cell) into VB to cover =TRIM(Range), but dont konw where to start?

thanks

Craig
 
Upvote 0

Forum statistics

Threads
1,215,487
Messages
6,125,073
Members
449,205
Latest member
Healthydogs

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
Back
Top