eliminating spaces in a field

Schwoerer

New Member
Joined
Dec 15, 2004
Messages
23
Hello,

I am having a problem importing a csv file into Access. In one of the fields, a few hundred lines have 3 blank spaces before the data. This, of course causes problems with maipulating the data in this field. Is there a way to shift everything to the left as you are able to do in Excel?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Well as in Excel you have the Trim function.

You could use this with an update query to remove the unwanted spaces from the field.

The SQL would look something like this:

UPDATE Table1 SET Table1.FieldA = Trim([FieldA]);

Where FieldA is the problem field.
 
Upvote 0

Forum statistics

Threads
1,203,136
Messages
6,053,699
Members
444,681
Latest member
Nadzri Hassan

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