field with spaces that need to be removed

guaya81

New Member
Joined
May 9, 2018
Messages
25
Good day guys and girls

I have an issue and need to find a way to resolve it
there is a column that has an amount and in that field, the number has 6 spaces and cant removed with formula I have to do it manually

$ 1,632.00 I try to replace, =substittute(h2," ",""), =substittute(h2," ","") and they dont work for me

do you have any suggestion


thanks
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Good day guys and girls

I have an issue and need to find a way to resolve it
there is a column that has an amount and in that field, the number has 6 spaces and cant removed with formula I have to do it manually

$ 1,632.00 I try to replace, =substittute(h2," ",""), =substittute(h2," ","") and they dont work for me
If you copied the values from another source (especially if you did so from a web page), then those spaces are probably not regular spaces (ASCII 32), rather, they are probably non-breaking spaces (ASCII 160). Give this formula a try...

=SUBSTITUTE(H2,CHAR(160),"")
 
Upvote 0
Mr. Rick

thank you I didn't work but I guess is another issue and I can use your formula in another place better, always learning something

thanks
 
Upvote 0
If the spaces are after the $ sign, put this in a blank cell & what does it return?
=CODE(MID(H2,2,1))
 
Upvote 0
Mr. Rick

thank you I didn't work but I guess is another issue and I can use your formula in another place better, always learning something
You should answer Fluff's question in Message #4 as what he is thinking about could be behind your problem. Following up on my post though, perhaps you have a mix of normal and non-breaking spaces. With that in mind, give this formula a try...

=SUBSTITUTE(SUBSTITUTE(H2,CHAR(160),"")," ","")
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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