Google Sheets: remove specific characters from string except decimal

14,172

I've just tested the following and have confirmed that it works

=REGEXREPLACE(A1, "[^0-9.]+", "")
Share:
14,172

Related videos on Youtube

nep
Author by

nep

Updated on June 04, 2022

Comments

  • nep
    nep almost 2 years

    Hi I have a column of messy data within Google Sheets I'm trying to clean up and remove any non-numeric characters except decimals.

    I'm having issues with the expression syntax within REGEXREPLACE (this works to remove the brackets/ quotes/ colon but also removes decimals, I want the decimals to remain):

    =REGEXREPLACE(A1,"\D+", ""))

    {"result":[[1482710400
    69294586954.95]
    [1513209600
    70212683668.01]
    [1513296000
    71293570461.83]
    [1513382400
    72432097963.87]
    [1513468800
    74422755261.42]
    [1513555200
    
  • nep
    nep over 5 years
    Works perfectly. Thanks so much for the quick reply.