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

Ali M

Active Member
Joined
Oct 10, 2021
Messages
287
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
 
finally it works first option delete the whole symbols :)
can you modify the code to implement for all of the columns?
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
can you modify the code to implement for all of the columns?
Yes, as long as you have tested it with both symbols in the column at the same time (it won't be the fastest code I've ever posted)
 
Upvote 0
well I mean implementing A:F not just in column A as you did it to test it .
I'm not talking about the fastest .
 
Upvote 0
well I mean implementing A:F not just in column A as you did it to test it .
I'm not talking about the fastest .
I still need you to confirm that you tested with both symbols in column A at the same time and not separately before I post code to cover the other columns
 
Upvote 0
I still need you to confirm that you tested with both symbols in column A at the same time and not separately
sorry I misunderstood I thought separately.
ok you mean I should put two lines inside the code . also works .
 
Upvote 0
ok you mean I should put two lines inside the code . also works .
No I meant with both symbols in the column.
What I don't want is if you ran the code on column A to remove the ? after we had removed the other symbol.
I need to be certain that it is working ok with both symbols in the column as per the original data.
 
Upvote 0
it delete all of the symbols , then the word become
الرصيد
 
Upvote 0
Ok, try the code below but make sure that you are still testing it on a copy of your original data.

VBA Code:
Sub UniKiller2()
' adapted code posted originally by Gary's Student
    Dim s As String, temp As String, i As Long, x As Long
    Dim C As String, myCol As Integer

    ActiveSheet.UsedRange.Replace What:="~" & ChrW(8236), Replacement:="", LookAt:=xlPart
 
    For myCol = 1 To 6
        For x = 1 To Cells(Rows.Count, "A").End(xlUp).Row
            s = Cells(x, myCol).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, myCol).Value = temp
        Next
    Next
End Sub
 
Last edited:
Upvote 0
Solution
excellent !
I check all of the columns and select random cells . obviously the code cleans symbols totally . :)
thanks for this great efforts & assistance ;)
 
Upvote 0
You're welcome, happy you got it working
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,287
Members
448,562
Latest member
Flashbond

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