Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel field has three spaces I need to remove from collumn.

Status
Not open for further replies.

bcblair

MIS
Feb 17, 2000
45
0
0
US
I have 700 records withe the following fields.

sample all different numbers but same format.
3000324
I use this to convert: =LEFT(A1,9)&" "&MID(A2,10,11)
THAT CONVERTS IT TO THE FOLLOWING
3000 324
I need the following
3000 324
in other word I need to delete the 3 leading spaces.
Does anyone know the change I need to make to the formula. [sig][/sig]
 
One simple answer is that the TRIM function should strip off extra spaces.

However, your explanation of the problem is a bit puzzling. You say the data are 'numbers' yet LEFT(A1,9) only extracts 4 digits. This would only be true if the data were a string with 5 leading blanks. But if that were the case, you wouldn't end up with 3 extra spaces in the result, you'd have 5.

With all that in mind, are you sure you're getting leading 'spaces' and not just that the alignment is set to center or right instead of left? [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top