+ Reply to Thread
Results 1 to 4 of 4

Thread: Remove Foreign Language

  1. #1
    Registered User
    Join Date
    10-28-2009
    Location
    Dubai
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Remove Foreign Language

    Hi

    I've got a spreadsheet that has over 5,000 rows and each cell has english and then the same text but in Arabic.

    I've tried searching everywhere that will remove all the non english (but keep numbers and punctuation).

    If anyone can help that would be much appreciated. I've attached a dummy example below.

    Thanks,
    Matt
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    3,788

    Re: Remove Foreign Language

    Does this work for you?
    Sub x()
    
    Dim rng As Range
    
    With CreateObject("vbscript.regexp")
        .Global = True
        .Pattern = "[^\d^\w^\s-\.\,]"
        For Each rng In Range("A1").CurrentRegion
            rng = .Replace(rng, "")
        Next rng
    End With
    
    End Sub

  3. #3
    Registered User
    Join Date
    10-28-2009
    Location
    Dubai
    MS-Off Ver
    Excel 2007
    Posts
    2

    Smile Re: Remove Foreign Language

    Absolute Beauty!

    That worked perfectly!

    Thanks so much.... i've spent the last 3 hours trying to work it out!

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    3,788

    Re: Remove Foreign Language

    Oh good, I wasn't entirely confident about that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0