+ Reply to Thread
Results 1 to 15 of 15

Remove unwanted character from range of cells

Hybrid View

YasserKhalil Remove unwanted character... 04-15-2015, 06:28 AM
:) Sixthsense :) Re: Remove unwanted character... 04-15-2015, 06:47 AM
YasserKhalil Re: Remove unwanted character... 04-15-2015, 07:15 AM
:) Sixthsense :) Re: Remove unwanted character... 04-15-2015, 07:28 AM
YasserKhalil Re: Remove unwanted character... 04-15-2015, 07:40 AM
YasserKhalil Re: Remove unwanted character... 04-15-2015, 07:34 AM
:) Sixthsense :) Re: Remove unwanted character... 04-15-2015, 07:42 AM
YasserKhalil Re: Remove unwanted character... 04-15-2015, 08:20 AM
YasserKhalil Re: Remove unwanted character... 04-15-2015, 08:35 AM
:) Sixthsense :) Re: Remove unwanted character... 04-15-2015, 08:54 AM
YasserKhalil Re: Remove unwanted character... 04-15-2015, 08:24 AM
salim ali Re: Remove unwanted character... 04-15-2015, 08:32 AM
jindon Re: Remove unwanted character... 04-15-2015, 08:52 AM
YasserKhalil Re: Remove unwanted character... 04-15-2015, 09:05 AM
:) Sixthsense :) Re: Remove unwanted character... 04-15-2015, 09:09 AM
  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Remove unwanted character from range of cells

    Hello everybody
    I have some data in column A
    for example
    I have this name "ســـــــــــالــــم" I need this name to be like that "سالم"

    The first name is made by convert keyboard to Arabic input and typing Shift + J when typing Arabic
    I need to get rid of all these characters made by Shift + J whch may be different in size : ـ ــ ـــ ــــ ـــــ ــــــ ـــــــ ـــــــــ

    I have a lot of data in Column A which is needed to be fixed properly
    Hope it's clear

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Remove unwanted character from range of cells

    Can you please use the Code() function in excel cell and let us know the code number of that text?

    =CODE("EnterThat-TextHere")


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Remove unwanted character from range of cells

    Thanks for quick reply
    The code is 220

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Remove unwanted character from range of cells

    Try this...

    Sub ReplaceMe()
        Selection.Replace Chr(220), "", xlPart, xlByRows, False
    End Sub

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Remove unwanted character from range of cells

    I solved that error by removing missing reference
    The problem now is that the code doesn't change anything at all.That's weird

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Remove unwanted character from range of cells

    Can't find project or library
    chr

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Remove unwanted character from range of cells

    Check missing references

    Tools > References in the Visual Basic Environment Window.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Remove unwanted character from range of cells

    Quote Originally Posted by :) Sixthsense :) View Post
    Check missing references

    Tools > References in the Visual Basic Environment Window.
    I solved that part. The problem now is that nothing changed

  9. #9
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Remove unwanted character from range of cells

    Thanks Mr. Salim Hasbia for your great formula ..
    Simple and easy
    But I still need to do that task by code and at the same time try to avoid loops

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Remove unwanted character from range of cells

    Quote Originally Posted by YasserKhalil View Post
    The problem now is that nothing changed
    Because I used Selection as range. Have you selected the range before running the code?

    Selection.Replace
    Otherwise replace the Selection property with your range like the below and check

    Sub ReplaceMe()
        Range("A1:B5").Replace Chr(220), "", xlPart, xlByRows, False
    End Sub

  11. #11
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Remove unwanted character from range of cells

    I had to loop
     For x = 1 To LastRowCon
                Cells(x, 1) = Replace(Cells(x, 1), Chr(220), "")
            Next x

  12. #12
    Forum Contributor
    Join Date
    04-15-2015
    Location
    beirut
    MS-Off Ver
    2010
    Posts
    107

    Re: Remove unwanted character from range of cells

    use this formulathe name is in cell a1)
    =SUBSTITUTE(A1,CHAR(220),"")

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Remove unwanted character from range of cells

    If Substitue function is working then
        With Range("a1", Range("a" & Rows.Count).End(xlUp))
            .Value = Application.Substitute(.Cells, Chr(220), "")
        End With

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Remove unwanted character from range of cells

    Mr. Jindon
    That's perfect thanks a lot
    Mr. Sixthsense
    Thanks a lot for offering help. you helped me a lot with this topic.
    As for last code didn't affect the range . I don't know why

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Remove unwanted character from range of cells

    Quote Originally Posted by YasserKhalil View Post
    As for last code didn't affect the range . I don't know why
    May be your range have formula resulting values.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. remove character 0194 the dodgy A with a hat from large range
    By Blake 7 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-19-2015, 11:57 AM
  2. [SOLVED] MACRO to remove unwanted character.
    By visha_1984 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2013, 03:47 AM
  3. Remove unwanted cells
    By C-Shore in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2011, 12:04 PM
  4. Excel 2007 : Remove Unwanted Text from Cells
    By rickygzz in forum Excel General
    Replies: 6
    Last Post: 08-01-2011, 10:28 PM
  5. Replies: 3
    Last Post: 01-31-2006, 04:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1