+ Reply to Thread
Results 1 to 9 of 9

Find & Replace function not fully working

  1. #1
    Registered User
    Join Date
    01-13-2016
    Location
    München
    MS-Off Ver
    2013
    Posts
    19

    Find & Replace function not fully working

    Dear Forum members,

    I do have a question to the find& replace function. I would like to replace "." by "',"
    In the initial file all cells are "general"

    When I replace everything manually, it works as it should.
    But if I record the macro and run it, numbers below 1 are correct (they stay in format "general"). Numbers 1 and higher become "number"-format, but without a comma, so they are way too big.

    Do you have an idea where this is coming from and what I can to against it?

    Recorded macro:
    Please Login or Register  to view this content.
    The problem:
    Capture.PNG

    I really hope for some help. Thanks a lot in advance
    Greetings
    Moni

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Find & Replace function not fully working

    Can you please attach the file instead of a screenshot?
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Find & Replace function not fully working

    I have the same.
    After inserting a "comma", the system recognizes a "dot" as a symbol of a grouping of digits.
    Use "Replace" as a worksheet function, i.e.:
    Please Login or Register  to view this content.
    Example from MS:
    Please Login or Register  to view this content.
    or equivalent code, i.e.:
    Please Login or Register  to view this content.
    e.g.
    Please Login or Register  to view this content.
    Last edited by mjr veverka; 11-08-2017 at 02:33 PM.

  4. #4
    Registered User
    Join Date
    01-13-2016
    Location
    München
    MS-Off Ver
    2013
    Posts
    19

    Re: Find & Replace function not fully working

    Hej,
    thanks for the quick reply.

    @6StringJazzer, here is a part of the file. I guess more is not necessary, because it's quite a lot of data...

    @porucha vevrku , Unfortunately I don't understand how the code works that you posted and the replace-line results in type mismatch

    Today I also changed the language settings of my computer. I don't know, if it's related, but since then also the manual find&replace is not working anymore and gives just a really long number with two decimal separation comma. I guess it's some setting with decimal things, even when I switched this option off. But the macro problem is far more important.
    Thanks
    Moni
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Find & Replace function not fully working

    Restore your original system settings, such you usually work on and try this below:
    (Select array (data with dots) then choose macro)
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-13-2016
    Location
    München
    MS-Off Ver
    2013
    Posts
    19

    Re: Find & Replace function not fully working

    Hej,
    thanks, the code runs only without any error, if there are only cells with numbers marked. It results now for every number in the same, but unfortunately wrong order of magnitude.

    27650.247 results with the macro in 27650247,00
    0.0088 results with the macro in 88
    Manually it works as it should be.

    Does somebody understands what's happening there? Of course I can divide my numbers simply by 10000, but I would prefer to understand the problem as well.

    Thanks :-)
    Moni
    Last edited by Blesbie; 11-14-2017 at 04:03 AM.

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Find & Replace function not fully working

    Hi,

    I think the problem is the conflict between your regional settings and VBA's US regional settings. Perhaps try
    Please Login or Register  to view this content.
    since VBA will treat the full stop as a decimal separator but the replaced value will appear with your regional comma.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

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

    Re: Find & Replace function not fully working

    Try
    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Find & Replace function not fully working

    Quote Originally Posted by Blesbie View Post
    ... 27650.247 results with the macro in 27650247,00
    0.0088 results with the macro in 88 ...
    Manually it works as it should be.
    What are practically your original system settings in the text separator, decimal separator and symbol of a grouping of digits /sign grouping of numbers ?
    Last edited by mjr veverka; 11-14-2017 at 09:23 AM.

+ 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. find and replace not working
    By kitbit in forum Excel General
    Replies: 25
    Last Post: 04-01-2019, 12:08 AM
  2. Find and replace not working
    By ammartino44 in forum Excel General
    Replies: 4
    Last Post: 08-25-2015, 12:36 PM
  3. VBA Find-Replace Not Working
    By 13gentj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2015, 08:18 PM
  4. [SOLVED] Find/Replace function not working - please help :)
    By gregrach in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-15-2014, 11:16 AM
  5. find and replace function is not working correctly
    By rhino87 in forum Excel General
    Replies: 2
    Last Post: 10-10-2012, 04:16 PM
  6. Find/Replace not working
    By narrowgate88 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-08-2010, 09:31 AM
  7. My Find and Replace function in Excel is not working?
    By BPeach in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-19-2006, 03:55 PM

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