Excel is automatically removing trailing spaces

ax1lla

New Member
Joined
Jul 23, 2018
Messages
2
Hey all - so we are having a very odd behavior with excel. Here are the facts.

We have a macro at our work where we paste an email into a worksheet. We run a macro and it takes that email and formats it nicely into another worksheet. This has worked for years without an issue. Easy stuff.

Recently, my work has made us upgrade to office 365. Now....the macro is not running correctly because Excel is removing trailing spaces on some of the cells (and the macro needs them to have a space at the end).

The odd thing here is....its working fine for one of my colleagues (not removing the space). But, for us other two.....its removing it. We all use the same file btw - on a network drive.

Any ideas on why this would happen and how to fix it?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
trailing spaces are insignificant and are removed.
if you want to keep them, try putting in quotes :
"my words "
 
Upvote 0
They are not insignificant to me. It is an inconsistent behavior for Excel to NOT remove it for two of us...but keep them for another. We are pasting an email in from outlook (and it contains spaces). I know I can put in code to remove space and then change my code to reflect this, but....it still irks me that Excel is removing stuff seeming randomly......
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,175
Members
449,071
Latest member
cdnMech

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