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.

300.00
440.00
1,694.11
2,909.54
5,400.00
5,572.91
15,000.00
16,323.00
22,406.14
26,000.00
3,608,953.30
11,690,758.54
274,929.00

<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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.

300.00
440.00
1,694.11
2,909.54
5,400.00
5,572.91
15,000.00
16,323.00
22,406.14
26,000.00
3,608,953.30
11,690,758.54
274,929.00

<tbody>
</tbody>


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,215,042
Messages
6,122,810
Members
449,095
Latest member
m_smith_solihull

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