Help

Finding Units from Product Name Field

Topic Labels: Formulas
223 1
cancel
Showing results for 
Search instead for 
Did you mean: 
mngl
4 - Data Explorer
4 - Data Explorer

I have a field which contains product names with measurement unit in the same field.

"Product Name 100grams" or "Product Name 500ml"

I want to create a formula to extract 100grams or 500ml (these measurement units need not to be in the last place of the field.

Is there any way to grab these units?

1 Reply 1
Sho
11 - Venus
11 - Venus

This formula returns a string consisting of the last word of the product name with the numerical value removed.
If the last word does not contain a numeric value, nothing is returned.

IF(
  REGEX_MATCH({Name}, ".* [\\d.,]+(.*$)"),
  REGEX_EXTRACT({Name}, ".* [\\d.,]+(.*$)")
)