Need Excel Formula - Removing trailing spaces that doesn't use clean or trim

wadezone

New Member
Joined
Apr 23, 2018
Messages
7
I am doing some data comparison/testing and need a way to remove trailing spaces from the end of each cell. The number of spaces at the end could vary depending on the data. Clean/TRIM is removing spaces in the middle that I must retain. I have also trying using SUBSTITUTE to replace but again is removing data in the middle of the text. Any ideas?

Thanks in advance
 
I always thought I was fairly advanced with Excel but mopp1 proved me wrong. I learned some new things today. The VBA function is clean and easy but I enjoyed figuring out what the row with indirect was doing. I had totally forgotten about CTRL+SHIFT+ENTER. I think I used it once several years ago. Now I need to go check out REPT.

I almost have everything in place.
I need to figure out how to get Excel to treat days of the week and months as text when it comes to sorting a list of songs and it is putting the song "September" at the top.

Thank you mopp1, RoryA , Rick Rothstein. RoryA, I appreciate the reminder about Excel constantly updating calculations. I have gotten in the habit of turning them of and let me do them when I am ready.

:)

 
Upvote 0

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.

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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