how clean strange symbols(?þ) from Table or range

Ali M

Active Member
Joined
Oct 10, 2021
Messages
290
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
Hi experts
I face dilemma when I received file by another person .
it shows after name like this :

item?þ
itemþ?
so how can I delete these from all of my table or in used range to become like this
item
is there any macro to clean the cells in table or in used range?
this symbols cause me big troubles with another macros(can't run)
thanks
 
yes that's correct , but I forgot saying this symbol # could be just in column F , as to others columns contains Arabic characters .
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I'll have another look at this later this evening
 
Upvote 0
I hope to find a solution on your hand because it seems none of the members will go into a topic like this though 118 views for this thread .:rolleyes:
 
Upvote 0
Can you try running the code below.
IMPORTANT: Copy and paste it into your code window, do not type/retype any part of it

VBA Code:
Sub Remove8207()
    With ActiveSheet.UsedRange
        .Replace What:="~?", Replacement:="", LookAt:=xlPart
        .Replace What:=ChrW(254), Replacement:="", LookAt:=xlPart
    End With
End Sub
 
Upvote 0
Also try the below. It is still designed to act only on column A as we are testing

VBA Code:
Sub UniKiller2()
    Dim s As String, temp As String, i As Long, x As Long
    Dim C As String

    ActiveSheet.UsedRange.Replace What:=ChrW(254), Replacement:="", LookAt:=xlPart
   
  For x = 1 To Cells(Rows.Count, "A").End(xlUp).Row
    s = Cells(x, 1).Value
  
    temp = ""

    For i = 1 To Len(s)
        C = Mid(s, i, 1)
        If AscW(C) < 8207 Or AscW(C) > 8207 Then
            temp = temp & C
        End If
    Next i
    Cells(x, 1).Value = temp
  Next
End Sub
 
Upvote 0
thanks for two codesز
first doesn't change any thing
second before running
this what showing as in picture but I can't copy and paste here because will change symbol.
1.PNG

after run the macro will delete one symbol not all to become like this
الرصيد?
 
Upvote 0
I'm not in yet but can you check if the formulas I gave you earlier are still returning the same numbers now one of the characters is gone please.
 
Last edited:
Upvote 0
here is the values again
Cell Formulas
RangeFormula
H1:H86H1=UNICODE(RIGHT(A1,1))
I1:I86I1=CODE(RIGHT(A1,1))
Named Ranges
NameRefers ToCells
ExternalData_1=Sheet1!$A$1:$F$86H1:I1
 
Upvote 0
Try changing

Rich (BB code):
ActiveSheet.UsedRange.Replace What:=ChrW(254), Replacement:="", LookAt:=xlPart
to
Rich (BB code):
ActiveSheet.UsedRange.Replace What:=Chr(63), Replacement:="", LookAt:=xlPart
 
Upvote 0
unfortunately will clear all of data and rename headers in row1( " column1", "column2......)
 
Upvote 0

Forum statistics

Threads
1,216,076
Messages
6,128,670
Members
449,463
Latest member
Jojomen56

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