+ Reply to Thread
Results 1 to 6 of 6

Remove Thai Baht (Currrency) Sign

Hybrid View

  1. #1
    Registered User
    Join Date
    10-12-2021
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Most recent
    Posts
    4

    Remove Thai Baht (Currrency) Sign

    I have been able to insert the Thai Baht currency sign using the formula (Range("A1").Value = ChrW(&HE3F) & "123". My problem is that I would like to automate the REMOVAL of the Baht sign from spreadsheets sent from Thailand. I need to do this because I own a restaurant there. I get daily sales and expense reports, but I can't consolidate those worksheets to get weekly, monthly and annual numbers unless I remove the Baht sign because Excel does not recognize it. I can remove it manually from each individual worksheet by copying the Baht sign from the worksheet and removing it using "Find and Replace" but I would like to automate the technique, if possible, to save myself some time. Unfortunately, the macro doesn't work because VBA doesn't recognize the character, and trying to replace it in the code doesn't work either. (It replaces the Baht sign with a "?" and so the code won't run). I have tried to use the unicode for the Baht but that too doesn't work. Can someone suggest a method for removing the Baht sign from the spreadsheets with a macro or some VBA code? Is it even possible? I would appreciate any ideas.

  2. #2
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Remove Thai Baht (Currrency) Sign

    Are you receiving these file from Thailand with Baht sign and want to remove the Baht sign?

    Can you post a sample file of what you are receiving and we can take a look at it?

  3. #3
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Remove Thai Baht (Currrency) Sign

    This is not ideal, but a start.

    If you have the symbol say in cell A2. You can check the worksheet to that cell and replace

    Again, a sample file would be very helpful. You can modify the below to loop the worksheets as well.

    Sub remove()
        Dim r As Range
        Dim stringvalue As String
    
    
        stringvalue = Range("A2").Value
        
        For Each r In ActiveSheet.UsedRange
           r.Value = Replace(r.Value, stringvalue, "")
        Next r
           
    End Sub

  4. #4
    Registered User
    Join Date
    10-12-2021
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Most recent
    Posts
    4

    Re: Remove Thai Baht (Currrency) Sign

    Please see the response from ByteMarks below. It works perfectly.

    Thanks for your interest!

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,924

    Re: Remove Thai Baht (Currrency) Sign

    This works for me.

    Sub Replace()
    Cells.Replace ChrW(&HE3F), "", xlPart
    End Sub

  6. #6
    Registered User
    Join Date
    10-12-2021
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Most recent
    Posts
    4

    Re: Remove Thai Baht (Currrency) Sign

    It works perfectly. Thanks a million!

+ 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. [SOLVED] How to remove the @ sign from VBA formulas
    By akedm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2021, 01:40 PM
  2. [SOLVED] Want to remove $ sign Form A4:A50
    By HaroonSid in forum Excel General
    Replies: 7
    Last Post: 04-21-2014, 12:52 AM
  3. [SOLVED] Remove - sign from columns
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-30-2013, 10:05 AM
  4. Remove a sign from a number
    By Monica85 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-28-2013, 01:53 AM
  5. Replies: 1
    Last Post: 07-30-2012, 01:27 PM
  6. [SOLVED] can you convert baht text back to a number?
    By maginator in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-02-2005, 11:30 AM
  7. [SOLVED] baht
    By BAHT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2005, 06:06 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