How to remove the spaces before and after the numbers

Cris_Jon

New Member
Joined
Jun 28, 2018
Messages
4
How do I remove the spaces before the numbers and after in excel. I tried find and replace and it does not work. I also tried trim still no use.

[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"] 300.00 [/TD]
[/TR]
[TR]
[TD] 440.00 [/TD]
[/TR]
[TR]
[TD] 1,694.11 [/TD]
[/TR]
[TR]
[TD] 2,909.54 [/TD]
[/TR]
[TR]
[TD] 5,400.00 [/TD]
[/TR]
[TR]
[TD] 5,572.91 [/TD]
[/TR]
[TR]
[TD] 15,000.00 [/TD]
[/TR]
[TR]
[TD] 16,323.00 [/TD]
[/TR]
[TR]
[TD] 22,406.14 [/TD]
[/TR]
[TR]
[TD] 26,000.00 [/TD]
[/TR]
[TR]
[TD] 3,608,953.30 [/TD]
[/TR]
[TR]
[TD] 11,690,758.54 [/TD]
[/TR]
[TR]
[TD] 274,929.00 [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi & welcome to the board.
Have you tried CLEAN?
 
Last edited:
Upvote 0
Hi & welcome to the board.
Have you tried CLEAN?

CLEAN does not remove non-breaking spaces (ASCII code 160) which is what I suspect the OP has surrounding his numbers (especially since TRIM did not work for him). So, I would suggest the OP try this formula and see if it works...

=SUBSTITUTE(A1,CHAR(160),"")
 
Upvote 0
How do I remove the spaces before the numbers and after in excel. I tried find and replace and it does not work. I also tried trim still no use.

[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"] 300.00[/TD]
[/TR]
[TR]
[TD] 440.00[/TD]
[/TR]
[TR]
[TD] 1,694.11[/TD]
[/TR]
[TR]
[TD] 2,909.54[/TD]
[/TR]
[TR]
[TD] 5,400.00[/TD]
[/TR]
[TR]
[TD] 5,572.91[/TD]
[/TR]
[TR]
[TD] 15,000.00[/TD]
[/TR]
[TR]
[TD] 16,323.00[/TD]
[/TR]
[TR]
[TD] 22,406.14[/TD]
[/TR]
[TR]
[TD] 26,000.00[/TD]
[/TR]
[TR]
[TD] 3,608,953.30[/TD]
[/TR]
[TR]
[TD] 11,690,758.54[/TD]
[/TR]
[TR]
[TD] 274,929.00[/TD]
[/TR]
</tbody>[/TABLE]


Hi there,

We could always remove the first and last character of the given string like this:

=LEFT(MID(A1,2,LEN(A1)),LEN(A1)-2)

This formula will return the string without the first character on the left and the first character on the right, which, in all cases, will be the spaces you are mentioning on this post.
 
Upvote 0
CLEAN does not remove non-breaking spaces (ASCII code 160) which is what I suspect the OP has surrounding his numbers (especially since TRIM did not work for him). So, I would suggest the OP try this formula and see if it works...

=SUBSTITUTE(A1,CHAR(160),"")

Thanks For the Tip Rick. It works.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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