Need Excel Formula to trim spaces before Numbers

raajnabriz

Board Regular
Joined
Jun 11, 2014
Messages
115
[FONT=&quot]Hi there,[/FONT]
[FONT=&quot]Please provide excel formula to trim spaces before numbers, i have received large data that contains spaces in each cell before the amount. I am using MS Office 2010.[/FONT]
[FONT=&quot]Thanks,[/FONT]
[FONT=&quot]Raaj.[/FONT]
 
When you trim, the numbers will still be in text format, try =TRIM()+0 to convert them back to numbers, then they should sum correctly.

Alternatively, select all of the cells with the amounts, then use find and replace (ctrl h), enter a single space in the Find box, leave the Replace box empty, then Repalce All.
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Thank you all for your gr8 effort in helping me out, I just received the required formula from a wonderful youtuber named Ms. Leila Gharani [thank you Ms. Leila].
 
Upvote 0
You also received the required answer here 3 days ago.

If the answer here was wrong then so was the question.
 
Upvote 0
You also received the required answer here 3 days ago.

If the answer here was wrong then so was the question.

Sorry Jason, I didn't mean to demean anyone of you there, but the correct formula that helped me was this

[TABLE="width: 500"]
<tbody>[TR]
[TD="class: xl113, width: 500, align: left"] =VALUE(TRIM(SUBSTITUTE(A1,CHAR(160),CHAR(32))))

This not only trimmed the spaces but also helped in getting the sum total of selected cells on the status bar and that was what I had requested.

Sorry once again if may be my question was not thoroughly explained by me.

I have received many a good work from this forum since many years and I thank everyone for that.

Raaj.[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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