Trim function not working on trailing space

WxShady13

Board Regular
Joined
Jul 24, 2018
Messages
184
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have a list of Employee numbers (varying from 4-6 digits) and they have a trailing space on all of them. I have tried the Trim function, and find/replace but nothing will remove the space. I have tried formatting them as General, Numbers and Text but I cannot get the space removed.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Where did this data come from? The Web or another program?
Many times such data has "special characters" which are not visible which are not regular spaces (could be things like non-breaking spaces, carriage returns, etc).

You can find out what exactly the last character in any blank cell is by entering this formula in any cell and seeing what it returns:
Excel Formula:
=CODE(RIGHT(A1,1))
(this example is checking cell A1, adjust according).

The formula will return the ASCII code for that last character. What number does it return for you?
 
Upvote 0
Where did this data come from? The Web or another program?
Many times such data has "special characters" which are not visible which are not regular spaces (could be things like non-breaking spaces, carriage returns, etc).

You can find out what exactly the last character in any blank cell is by entering this formula in any cell and seeing what it returns:
Excel Formula:
=CODE(RIGHT(A1,1))
(this example is checking cell A1, adjust according).

The formula will return the ASCII code for that last character. What number does it return for you?
The data comes from our Oracle DB. When I pull a different type of report it doesn't have the trailing space on the Emp ID so that is why I am confused as to why it is there now. When I use that code it returns 160
 
Upvote 0
Glad I was able to help!
:)
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,072
Members
449,093
Latest member
ripvw

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