none
Is there any limitation on VBA function REPLACE inOoffice 365? RRS feed

  • Question

  •  The below given replace function "To replace comma with decimal point" doesn't work in Office 365 whereas it works fine in Excel 2016.

    (Replace(Range("O6").Text, ",", "."))

    When I run my VBA code in Excel 2016 the values are retrieved correctly with decimal point. But when run the same script in Office 365 it is returning the values with comma in place if decimal point. Please clarify.

    Monday, August 13, 2018 7:36 AM

All replies

  • Hi Monica,

    Based on my test, the Replace function works for me now. I have created simple case as below:

    Sub TestReplace()
      Dim result As String
      MsgBox (Range("A1").Text)
      result = Replace(Range("A1").Text, ",", ".")
      MsgBox (result)
    End Sub

    Also, My O365 version is 1808(Build 10730.20017). Could you please provider your Office version and post your detail code for this? 

    For more information, please see REPLACE function

    Thanks,

    Simon


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.


    Monday, August 13, 2018 10:19 AM
    Moderator
  • Hi Monica,

    Did you resolved your issue ? Hope you updates for this. 

    Best Regards,

    Simon


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Thursday, August 16, 2018 2:28 AM
    Moderator