Calc KEEPNUMBERS function

The KEEPNUMBERS function returns a string with only the numeric characters from the input string.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.


Description

The KEEPNUMBERS function is used to extract only the numeric characters from a given string. This is useful when you want to clean up a string by removing all non-numeric characters.


Syntax

KEEPNUMBERS(text)


The KEEPNUMBERS function syntax has the following argument:

  • text - Required. The text string from which you want to extract numeric characters.

Example

FormulaDescriptionResult
=KEEPNUMBERS("abc123def456")Extracts numbers from the string "abc123def456"123456
=KEEPNUMBERS("Order #7890")Extracts numbers from the string "Order #7890"7890

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.