+ Reply to Thread
Results 1 to 12 of 12

Replace point with comma - Numeric value error

  1. #1
    Registered User
    Join Date
    05-31-2019
    Location
    London
    MS-Off Ver
    Excel
    Posts
    15

    Replace point with comma - Numeric value error

    Hi everyone,
    I have a column with numeric values ​​that, to set the decimals, have the dot rather than the comma.
    To replace all the points with commas, I inserted this part into a macro.

    The macro therefore replaces all values, the problem is that the values ​​of these cells are not read as numeric values ​​(which can be added together).
    To make them become numeric value, so you can add them up, I have to click on each cell.
    At that point the content of the cell automatically moves from left to right and these values ​​become summable between them.

    Is there a way to avoid this "click" step on each cell? I hope I explained myself. Thank you !


    Please Login or Register  to view this content.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,332

    Re: Replace point with comma - Numeric value error

    Why would you need to replace the default decimal separator with a comma ??????
    Seems initially a pointless (no pun intended) exercise if you are summing numerics.
    Alternatively alter your regional settings and make the "," the default decimal separator.
    A bit messy as you will have to change back to use other workbooks containing the standard separator.
    torachan

  3. #3
    Registered User
    Join Date
    05-31-2019
    Location
    London
    MS-Off Ver
    Excel
    Posts
    15

    Re: Replace point with comma - Numeric value error

    Those settings are already present, the comma is already configured to be a decimal separator.

    I have to replace point with comma and make it readable as if it were an accounting value because otherwise I can't sum the cells

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,322

    Re: Replace point with comma - Numeric value error

    Try replacing the point with a point, since VBA works with US regional settings.
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Registered User
    Join Date
    05-31-2019
    Location
    London
    MS-Off Ver
    Excel
    Posts
    15

    Re: Replace point with comma - Numeric value error

    Both with the dot and with the comma, the problem is present. Until I click in the cell, it is not converted to "numerical value"

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Replace point with comma - Numeric value error

    Firstly what is the cell formated as? If it is text the results would be the same as you have described,

    If you format the cells as a number first (even tho they contain text) then do the find and replace as suggested, does this work?

  7. #7
    Registered User
    Join Date
    05-31-2019
    Location
    London
    MS-Off Ver
    Excel
    Posts
    15

    Re: Replace point with comma - Numeric value error

    Maybe I found a solution, strange but it's a solution ...

    What can I write in VBA to ensure that in the S column you look for cells that ARE NOT EMPTY and multiply the value by 1? :-) This should work

  8. #8
    Registered User
    Join Date
    05-31-2019
    Location
    London
    MS-Off Ver
    Excel
    Posts
    15

    Re: Replace point with comma - Numeric value error

    for davsth - I tried to format the cells as numbers or accounting but the problem persists

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    I have differents easy ways but I can't choose any without a workbook attachment !

    And how the data come to the worksheet 'cause better than modify cells is to correct the importation …

  10. #10
    Registered User
    Join Date
    05-31-2019
    Location
    London
    MS-Off Ver
    Excel
    Posts
    15

    Re: Replace point with comma - Numeric value error

    I try this and it works! :-)
    Thanks for your support

    Please Login or Register  to view this content.

  11. #11
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Replace point with comma - Numeric value error


    As it may be done with an unique codeline by at least two different ways just using Excel basics, at child level …

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

    Re: Replace point with comma - Numeric value error

    Try
    Please Login or Register  to view this content.

+ 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. Replies: 10
    Last Post: 06-17-2020, 09:29 AM
  2. comma vs. point
    By travelkid in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-29-2019, 01:13 PM
  3. change comma with point
    By bogd1n in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-16-2016, 02:03 PM
  4. Replies: 1
    Last Post: 09-17-2014, 07:30 AM
  5. [SOLVED] Code to Replace Comma with dot and dot with comma
    By BS Singh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-17-2014, 06:10 PM
  6. replace the comma separator to a dot and dot to a comma at the same time
    By barkiny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2010, 05:42 PM
  7. Numeric keyboard decimal key - comma or point or both
    By nsv in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-07-2008, 04:08 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