+ Reply to Thread
Results 1 to 5 of 5

Replacing comma with nothing replaces both dots and commas??

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    14

    Replacing comma with nothing replaces both dots and commas??

    Hello,

    I have a problem which looks like a bug to me but it must've been experienced before. In Sweden we use commas as decimal separator. In my sheet I have a column which has numbers such as

    '14.900,00 - [fourteen thousand nine hundred] - appears as 14.900,00
    29,15 - [twenty-nine point fifteen] - appears as 29,15

    I want to make the numbers consistent. So I'm using a simple replace code to replace all ".". However, when doing this, both commas and dots are replaced! This turns
    '14.900 into 14 900
    29,15 into 2 915,00

    wtf!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Replacing comma with nothing replaces both dots and commas??

    Hi,

    Are the 'numbers' that you're trying to replace real numbers or just text that happens to look like a number. Test with =ISNUMBER(A1)

    If they are numbers have you tried temporarily changing your regional settings so that commas are the thousands separator and the dot the decimal. Then run your macro.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Replacing comma with nothing replaces both dots and commas??

    Hi,
    No the 14.900 is not a number (because of the dot). If I could just replace the dot with [nothing], it would turn into a number (14 900,00). When using CTRL+F/replace, it works like a wonder. When using VBA, it replaces both dots and commas.

  4. #4
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Replacing comma with nothing replaces both dots and commas??

    bump. anyone?

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Replacing comma with nothing replaces both dots and commas??

    Hi,

    this line
    Please Login or Register  to view this content.
    should be like this
    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

+ 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. replace Dots for comma both collums
    By JohnDpi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2014, 01:38 PM
  2. Changing dots to commas
    By GoingCrazy in forum Excel General
    Replies: 3
    Last Post: 07-13-2009, 08:06 PM
  3. Replacing dots with commas using macro
    By maxest in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2006, 11:35 AM
  4. Replacing commas with carriage return
    By Hardip in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  5. Change Dots into Commas as Decimal Divider
    By xenia in forum Excel General
    Replies: 3
    Last Post: 08-08-2005, 04:48 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