Hidden Character

rhmkrmi

Active Member
Joined
Aug 17, 2012
Messages
348
Office Version
  1. 365
Platform
  1. Windows
Hello,

I seem to have one hidden character at the front and another at the end of a text in a workbook.
I cannot find out what character it is and cannot remove if using CHAR(160) with CLEAN, TRIM, SUBSTITUTE.
I have only been able to find out that it is unicode 8237 at the beginning and unicode 8236 at the end.

Could you please help find a formula to remove these two hidden characters?
I have a VBA which is shown here but would like to use a formula.

Sub Kleanup()
Dim N1 As Long, N2 As Long
Dim Bad1 As String, Bad2 As String

N1 = 8237
Bad1 = ChrW(N1)
N2 = 8236
Bad2 = ChrW(N2)

Cells.Replace what:=Bad1, replacement:=" ", lookat:=xlPart
Cells.Replace what:=Bad2, replacement:=" ", lookat:=xlPart

End Sub

Thank you.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Since you are using Excel 365, you might want to investigate a LAMBDA function to interrogate your text string...such as this one:
 
Upvote 0
If it is at the beginning and end of all the values then would this do?

Excel Formula:
=MID(A1,2,LEN(A1)-2)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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