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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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,544
Messages
6,125,438
Members
449,225
Latest member
mparcado

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