Remove space(s) before a numerical value within a cell

DMP3

New Member
Joined
Aug 11, 2010
Messages
11
Trying to remove the space in front of the number '1' in cell A2.

So value in cell A2 is = " 1"

TRIM function does not work for removing the space before the 1.

Any ideas please?
 
i did that as well,

when i copy & paste as Vulvae same data form workbook A to B then is works fine.. e.g A1 to A1
 
Last edited:
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
TRIM works for me.
What does =CODE(A2) return?

^This guy is on the right track.

Both trim and my first find/replace attempt did not work, but here's what I did that worked:

Go to one of the cells you are trying to remove the space(s) from and highlight the "text" (the space) you want to remove. Copy+Paste that selection into the find field of the find/replace window, do not put anything in the replace field, and hit replace all.
 
Upvote 0
=VALUE(SUBSTITUTE(SUBSTITUTE(A2," ",""),MID(A2,1,1),""))
This formula will remove all spaces in your numeric value
100% workable..!!!
 
Upvote 0
Hi,

Assuming data in A1,

If it's a Real Space, then the Value Must be Text, as Excel will automatically drop spaces for numbers entered, in that case, Real Space(s) with a Text Number, you just need this:

=A1+0

Otherwise, it Must be a Non-breaking Space, CHAR(160), usually happens when data is imported or downloaded, then just use this:

=SUBSTITUTE(A1,CHAR(160),"")+0
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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